[PATCH v5 1/3] merge-recursive: test rename threshold option

2016-02-20 Thread Felipe Gonçalves Assis
Commit 10ae7526bebb505ba01f76ec97d5f7b5e0e5 introduced this feature, but did not include any tests. This commit fixes this. Signed-off-by: Felipe Gonçalves Assis --- This commit is independent of the proposed feature, so it might be of interest even if the rest of

[PATCH v5 2/3] merge-recursive: option to disable renames

2016-02-20 Thread Felipe Gonçalves Assis
The recursive strategy turns on rename detection by default. Add a strategy option to disable rename detection even for exact renames. Signed-off-by: Felipe Gonçalves Assis --- Added tests. For consistent naming, I renamed and slightly edited the test of whitespace

[PATCH v5 3/3] merge-recursive: more consistent interface

2016-02-20 Thread Felipe Gonçalves Assis
Add strategy option find-renames, following git-diff interface. This makes the option rename-threshold redundant. Signed-off-by: Felipe Gonçalves Assis --- Added tests and made --find-renames reset the similarity index to the default. Documentation/merge-strategies.txt

[PATCH v5 0/3] merge-recursive: option to disable renames

2016-02-20 Thread Felipe Gonçalves Assis
Add tests as suggested by Eric Sunshine. Also fixes an inconsitency in the last part. Since there were no tests for the --rename-threshold option, I added them in a separate commit, which is useful in itself. The other two commits contain the previous patches plus the relevant tests. For the

Re: interactive rebase results across shared histories

2016-02-20 Thread Moritz Neeb
Hi Seb, On 02/20/2016 11:58 PM, Seb wrote: > Hello, > > I've recently learnt how to consolidate and clean up the master branch's > commit history. I've squashed/fixuped many commits thinking these would > propagate to the children branches with whom it shares the earlier parts > of the its

Re: [PATCH v5 23/27] svn: learn ref-storage argument

2016-02-20 Thread Eric Wong
David Turner wrote: > +++ b/git-svn.perl > + if (defined $_ref_storage) { > + push @init_db, "--ref-storage=" . $_ref_storage; > + } Minor nit: git-svn uses tabs for indentation. Otherwise, if we go this route, consider it:

Re: [PULL] svn pathnameencoding for git svn dcommit

2016-02-20 Thread Eric Wong
Kazutoshi Satoda wrote: > (Shouldn't the branch be based on maint, as these are bugfixes?) I'm not sure if it being previously left-out/untested feature would qualify for maint. Maybe it does, but I suppose I'll let Junio decide. > Thank you. I tried it but got similar

interactive rebase results across shared histories

2016-02-20 Thread Seb
Hello, I've recently learnt how to consolidate and clean up the master branch's commit history. I've squashed/fixuped many commits thinking these would propagate to the children branches with whom it shares the earlier parts of the its history. However, this is not the case; switching to the

Re: [PATCH] tests: rename work-tree tests to *work-tree*

2016-02-20 Thread Junio C Hamano
Michael J Gruber writes: > "Work tree" or "working tree" is the name of a checked out tree, > "worktree" the name of the command which manages several working trees. > The naming of tests mixes these two, currently: > > $ls t/*worktree* > ... > Rename t1501, t1509 and

Re: [PATCH] remote-curl: don't fall back to Basic auth if we haven't tried Negotiate

2016-02-20 Thread Junio C Hamano
Dmitry Vilkov writes: > Hi guys! Any luck with fixing this issue? I think Brian suggested an alternative approach, to which you earler responded >> That would be great! Definitely it will be much better solution than >> patch I've proposed. The patch has been queued

Re: [PATCH v5 25/27] refs: add LMDB refs storage backend

2016-02-20 Thread Junio C Hamano
David Turner writes: > So just add this after every mkdir? > > if (shared_repository) > adjust_shared_perm(db_path); The function itself checks shared_repository configuration, so the caller does not have to bother. You should rather treat it as a

Re: [PATCH 04/21] harden REALLOC_ARRAY and xcalloc against size_t overflow

2016-02-20 Thread René Scharfe
Am 19.02.2016 um 12:22 schrieb Jeff King: REALLOC_ARRAY inherently involves a multiplication which can overflow size_t, resulting in a much smaller buffer than we think we've allocated. We can easily harden it by using st_mult() to check for overflow. Likewise, we can add ALLOC_ARRAY to do the

Git Download Problem

2016-02-20 Thread Zakaria Itani
Hello, After downloading version 2.6.4 of git for mac, i faced a problem launching it where a message showed up saying git-2.6.4-intel-universal-mavericks.dmg couldn't be opened since image is not recognized. My mac's current version is Yosemite 10.10.3 I'd like to know how could I fix this

[PATCH] tests: rename work-tree tests to *work-tree*

2016-02-20 Thread Michael J Gruber
"Work tree" or "working tree" is the name of a checked out tree, "worktree" the name of the command which manages several working trees. The naming of tests mixes these two, currently: $ls t/*worktree* t/t1501-worktree.sh t/t1509-root-worktree.sh t/t2025-worktree-add.sh t/t2026-worktree-prune.sh

Re: [PATCH] remote-curl: don't fall back to Basic auth if we haven't tried Negotiate

2016-02-20 Thread brian m. carlson
On Sat, Feb 20, 2016 at 05:35:19PM +0300, Dmitry Vilkov wrote: > Maybe you could accept my patch, so users would use > "credential.helper=store" to avoid using ":@" in remote URL? At least > for now, while there is no good solution to this issue? It would be > very helpful because now we have to

Re: GSoC 2016: Microproject

2016-02-20 Thread Mehul Jain
Hello, I faced the following problem when I tested master branch. Here I have made no commits to master branch. *** t5539-fetch-http-shallow.sh *** ok 1 - setup shallow clone not ok 2 - clone http repository # # git clone --bare --no-local shallow "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" && # git

Re: [PATCH] remote-curl: don't fall back to Basic auth if we haven't tried Negotiate

2016-02-20 Thread Dmitry Vilkov
Hi guys! Any luck with fixing this issue? I would like to draw your attention to the fact that Git starting from version 2.3.1 is unusable with servers that support GSS-Negotiation (e.g. Microsoft TFS). Sorry, english is not my native language and probably I was not clear enough when described

[PATCH] git.c: simplify striping extension of a file in handle_builtin()

2016-02-20 Thread Alexander Kuleshov
The handle_builtin() starts from striping of command extension if STRIP_EXTENSION is enabled. Actually STRIP_EXTENSION does not used anywhere else. This patch introduces strip_extension() helper to strip STRIP_EXTENSION extension from argv[0] with the strip_suffix() instead of manually striping.

Re: [PATCH v5 25/27] refs: add LMDB refs storage backend

2016-02-20 Thread Duy Nguyen
On Fri, Feb 19, 2016 at 3:23 AM, David Turner wrote: > On Thu, 2016-02-18 at 15:50 +0700, Duy Nguyen wrote: > > [snip] > > Thanks; applied the above > >> This permission makes me wonder if we need adjust_shared_perm() here >> and some other places. > > So just add this

Re: [PATCH] git-compat-util.h: move extension stripping from handle_builtin()

2016-02-20 Thread Alexander Kuleshov
Hello Jeff, On 02-20-16, Jeff King wrote: > On Sat, Feb 20, 2016 at 02:10:58PM +0600, Alexander Kuleshov wrote: > > I'm not convinced that moving the functions inline into git-compat-util > is actually cleaner. We've expanded the interface that is visible to the > whole code base, warts at all.

Re: [PATCH] git-p4.py: Make submit working on bare repository

2016-02-20 Thread Amadeusz Żołnowski
Hi Junio, To submit changes from master branch to Perforce, new commits should be based on a remote branch p4/master: (1) E'---F' master / A---B---C---D p4/master Commits from A to D map to Perforce changelists. These commits include additional metadata in

Re: [PATCH] submodule: Fetch the direct sha1 first

2016-02-20 Thread Jacob Keller
On Fri, Feb 19, 2016 at 1:13 PM, Junio C Hamano wrote: >> Regarding performance, the first fetch should fail quite fast iff the fetch >> fails and then continue with the normal fetch. In case the first fetch works >> fine getting the exact sha1, the fetch should be faster than

Re: GSoC 2016: applications open, deadline = Fri, 19/2

2016-02-20 Thread Johannes Schindelin
Hi Junio, On Fri, 19 Feb 2016, Junio C Hamano wrote: > The "experimenting" would include mergy operations like "am -3" and > "cherry-pick". "After queuing a topic and trying it in isolation, an > attempt to merge to the baseline results in quite a mess, and I give > up"--there is nothing to

Re: [PATCH 06/21] convert manual allocations to argv_array

2016-02-20 Thread Eric Sunshine
On Sat, Feb 20, 2016 at 3:57 AM, Jeff King wrote: > On Sat, Feb 20, 2016 at 03:39:36AM -0500, Eric Sunshine wrote: >> I also had made the strbuf_detach() analogy in my response but deleted >> it before sending; I do think it's a reasonable API template to mirror >> via new

Re: [PATCH v5 25/27] refs: add LMDB refs storage backend

2016-02-20 Thread Duy Nguyen
On Thu, Feb 18, 2016 at 12:17 PM, David Turner wrote: > LMDB has a few features that make it suitable for usage in git: > ... I'm reading lmdb documents and hitting the caveat section [1]. Random thoughts * "There is normally no pure read-only mode, since readers need

Re: [PATCH 06/21] convert manual allocations to argv_array

2016-02-20 Thread Jeff King
On Sat, Feb 20, 2016 at 03:39:36AM -0500, Eric Sunshine wrote: > I also had made the strbuf_detach() analogy in my response but deleted > it before sending; I do think it's a reasonable API template to mirror > via new argv_array_detach(). That would look like this, which I think is not too bad

Re: [PATCH] git-compat-util.h: move extension stripping from handle_builtin()

2016-02-20 Thread Jeff King
On Sat, Feb 20, 2016 at 02:10:58PM +0600, Alexander Kuleshov wrote: > The handle_builtin() starts from striping of command extension if > STRIP_EXTENSION is enabled. As this is an OS dependent, let's move > to the git-compat-util.h as all similar functions to do handle_builtin() > more cleaner.

Re: [PATCH 06/21] convert manual allocations to argv_array

2016-02-20 Thread Eric Sunshine
On Sat, Feb 20, 2016 at 3:34 AM, Jeff King wrote: > On Sat, Feb 20, 2016 at 03:29:29AM -0500, Eric Sunshine wrote: >> On Sat, Feb 20, 2016 at 3:10 AM, Jeff King wrote: >> > On Sat, Feb 20, 2016 at 03:07:00AM -0500, Eric Sunshine wrote: >> >> > + /*

Re: [PATCH 06/21] convert manual allocations to argv_array

2016-02-20 Thread Jeff King
On Sat, Feb 20, 2016 at 03:29:29AM -0500, Eric Sunshine wrote: > On Sat, Feb 20, 2016 at 3:10 AM, Jeff King wrote: > > On Sat, Feb 20, 2016 at 03:07:00AM -0500, Eric Sunshine wrote: > >> > + /* argv strings are now owned by pathspec */ > >> > +

Re: [PATCH 06/21] convert manual allocations to argv_array

2016-02-20 Thread Eric Sunshine
On Sat, Feb 20, 2016 at 3:10 AM, Jeff King wrote: > On Sat, Feb 20, 2016 at 03:07:00AM -0500, Eric Sunshine wrote: >> > + /* argv strings are now owned by pathspec */ >> > + paths.argc = 0; >> > + argv_array_clear(); >> >> This overly

[PATCH] git-compat-util.h: move extension stripping from handle_builtin()

2016-02-20 Thread Alexander Kuleshov
The handle_builtin() starts from striping of command extension if STRIP_EXTENSION is enabled. As this is an OS dependent, let's move to the git-compat-util.h as all similar functions to do handle_builtin() more cleaner. --- git-compat-util.h | 18 ++ git.c | 13

Re: [PATCH 06/21] convert manual allocations to argv_array

2016-02-20 Thread Jeff King
On Sat, Feb 20, 2016 at 03:07:00AM -0500, Eric Sunshine wrote: > > diff --git a/line-log.c b/line-log.c > > @@ -746,23 +747,16 @@ void line_log_init(struct rev_info *rev, const char > > *prefix, struct string_list > > if (!rev->diffopt.detect_rename) { > > - int i, count =

Re: [PATCH 06/21] convert manual allocations to argv_array

2016-02-20 Thread Eric Sunshine
On Fri, Feb 19, 2016 at 6:23 AM, Jeff King wrote: > There are many manual argv allocations that predate the > argv_array API. Switching to that API brings a few > advantages: > > 1. We no longer have to manually compute the correct final > array size (so it's one less thing