Re: Parallel checkout (Was Re: 0 bot for Git)

2016-04-15 Thread Michael Haggerty
On 04/15/2016 06:52 PM, Jeff King wrote: > On Fri, Apr 15, 2016 at 01:18:46PM +0200, Christian Couder wrote: > >> On Fri, Apr 15, 2016 at 11:51 AM, Duy Nguyen wrote: >>> On Fri, Apr 15, 2016 at 12:04:49AM +0200, Christian Couder wrote: There is a draft of an article

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 5:49 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +static int line_length(const char *recs) >> +{ >> + char *s = strchr(recs, '\n'); >> + return s ? s - recs : strlen(recs); >> +} > > It seems that you guys are

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 5:49 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> +static int line_length(const char *recs) >> +{ >> + char *s = strchr(recs, '\n'); >> + return s ? s - recs : strlen(recs); >> +} > > It seems that you guys are

Re: possible to checkout same branch in different worktree

2016-04-15 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 10:36 PM, Junio C Hamano wrote: > Reto Hablützel writes: > >> the checkout command prevents me from checking out a branch in the >> current worktree if it is already checked out in another worktree. >> >> However, if I rebase the

[PATCH 1/2] submodule: port resolve_relative_url from shell to C

2016-04-15 Thread Stefan Beller
Later on we want to automatically call `git submodule init` from other commands, such that the users don't have to initialize the submodule themselves. As these other commands are written in C already, we'd need the init functionality in C, too. The `resolve_relative_url` function is a large

[PATCH 2/2] submodule: port init from shell to C

2016-04-15 Thread Stefan Beller
By having the `submodule init` functionality in C, we can reference it easier from other parts in the code in later patches. The code is split up to have one function to initialize one submodule and a calling function that takes care of the rest, such as argument handling and translating the

[PATCH 0/2] Another reroll of sb/submodule-init

2016-04-15 Thread Stefan Beller
* squashed the fixes from Johannes Sixt to unbreak Windows tests. (I had encoding issues; so I manually integrated the changes) * fixed memleaks * the base to apply did not change (ee30f17805f51d37 Merge branch 'sb/submodule-path-misc-bugs' into sb/submodule-init) Thanks, Stefan diff to

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Junio C Hamano
Stefan Beller writes: > +static int line_length(const char *recs) > +{ > + char *s = strchr(recs, '\n'); > + return s ? s - recs : strlen(recs); > +} It seems that you guys are discarding this "number of bytes on a line, no matter what these bytes are" idea, so this

Re: [PATCH v2 16/21] bisect: make total number of commits global

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > The total number of commits in a bisect process is a property of > the bisect process. Making this property global helps to make the code > clearer. > > Signed-off-by: Stephan Beyer > --- After wondring about count++ vs nr, I re-read

Re: Git mascot

2016-04-15 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 11:41 PM, Christian Howe wrote: > There has been talk of a git mascot a while back in 2005. Some people > mentioned a fish or a turtle. Since all the great open source projects > like Linux or RethinkDB have a cute mascot, git definitely needs one > as

Re: [PATCH v4 03/16] index-helper: new daemon for caching index and related stuff

2016-04-15 Thread Duy Nguyen
On Sat, Apr 16, 2016 at 3:21 AM, David Turner wrote: > On Fri, 2016-04-15 at 18:25 +0700, Duy Nguyen wrote: >> On Thu, Apr 14, 2016 at 1:47 AM, David Turner < >> dtur...@twopensource.com> wrote: >> > > > + fd = unix_stream_connect(socket_path); >> > > > + if

Re: Parallel checkout (Was Re: 0 bot for Git)

2016-04-15 Thread Duy Nguyen
On Fri, Apr 15, 2016 at 10:08 PM, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 2:51 AM, Duy Nguyen wrote: >> On Fri, Apr 15, 2016 at 12:04:49AM +0200, Christian Couder wrote: >> The idea is simple, you offload some work to process workers. In this >>

Re: [PATCH v4 15/16] branch: use ref-filter printing APIs

2016-04-15 Thread Stefan Beller
> static int calc_maxwidth(struct ref_array *refs, int remote_bonus) > { > int i, max = 0; > @@ -432,7 +281,10 @@ static int calc_maxwidth(struct ref_array *refs, int > remote_bonus) > > skip_prefix(it->refname, "refs/heads/", ); >

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-04-15 Thread Duy Nguyen
On Sat, Apr 16, 2016 at 12:06 AM, Junio C Hamano wrote: > Junio C Hamano writes: > >> Nguyễn Thái Ngọc Duy writes: >> >>> This keeps top dir a bit less crowded. And because these programs are >>> for testing purposes, it makes sense that

Re: [PATCH v4 09/16] index-helper: use watchman to avoid refreshing index with lstat()

2016-04-15 Thread Stefan Beller
> +static void refresh_by_watchman(struct index_state *istate) > +{ > + void *shm = NULL; > + int length; > + int i; > + struct stat st; > + int fd = -1; > + const char *path = index_helper_path("git-watchman-%s-%"PRIuMAX, > +

Re: [PATCH v4 03/16] index-helper: new daemon for caching index and related stuff

2016-04-15 Thread Stefan Beller
> +static int try_shm(struct index_state *istate) > +{ > + void *new_mmap = NULL; > + size_t old_size = istate->mmap_size; > + ssize_t new_size; > + const unsigned char *sha1; > + struct stat st; > + int fd; > + > + if (!is_main_index(istate) || > +

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 4:32 PM, Jacob Keller wrote: > On Fri, Apr 15, 2016 at 4:05 PM, Jacob Keller wrote: >> There's a few places that will need cleaning up (comments and such) >> that mention empty line still, but that's not surprising. I am

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 4:05 PM, Jacob Keller wrote: > There's a few places that will need cleaning up (comments and such) > that mention empty line still, but that's not surprising. I am going > to test this for a bit on my local repos, and see if it makes any >

Re: [PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 4:01 PM, Stefan Beller wrote: > In order to produce the smallest possible diff and combine several diff > hunks together, we implement a heuristic from GNU Diff which moves diff > hunks forward as far as possible when we find common context above and >

[PATCH 1/2] xdiff: add recs_match helper function

2016-04-15 Thread Stefan Beller
From: Jacob Keller It is a common pattern in xdl_change_compact to check that hashes and strings match. The resulting code to perform this change causes very long lines and makes it hard to follow the intention. Introduce a helper function recs_match which performs both

[PATCH 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Stefan Beller
In order to produce the smallest possible diff and combine several diff hunks together, we implement a heuristic from GNU Diff which moves diff hunks forward as far as possible when we find common context above and below a diff hunk. This sometimes produces less readable diffs when writing C,

[RFC PATCH, WAS: "weird diff output?" v3a 0/2] implement shortest line diff chunk heuristic

2016-04-15 Thread Stefan Beller
This is a version based on Jacobs v2, with the same fixes as in his v3 (hopefully), changing the heuristic, such that CRLF confusion might be gone. TODO: * add some tests * think about whether we need a git attribute or not (I did some thinking, and if we do need to configure this at all, this

[RFC PATCH, WAS: "weird diff output?" v3 1/2] xdiff: add recs_match helper function

2016-04-15 Thread Jacob Keller
From: Jacob Keller It is a common pattern in xdl_change_compact to check that hashes and strings match. The resulting code to perform this change causes very long lines and makes it hard to follow the intention. Introduce a helper function recs_match which performs both

[RFC PATCH, WAS: "weird diff output?" v3 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
From: Stefan Beller In order to produce the smallest possible diff and combine several diff hunks together, we implement a heuristic from GNU Diff which moves diff hunks forward as far as possible when we find common context above and below a diff hunk. This sometimes

[RFC PATCH, WAS: "weird diff output?" v3 0/2] implement empty line diff chunk heuristic

2016-04-15 Thread Jacob Keller
From: Jacob Keller Third version of my series with a few more minor fixups. I left the diff command line and configuration option alone for now, suspecting that long term we either (a) remove it or (b) use a gitattribute, so there is no reason to bikeshed the name or its

Re: [PATCH v2 21/21] bisect: get back halfway shortcut

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > The documentation says that when the maximum possible distance > is found, the algorithm stops immediately. That feature is > reestablished by this commit. > > Signed-off-by: Stephan Beyer > --- > > Notes: > I plugged a memory leak

Re: [PATCH v2 19/21] bisect: use a bottom-up traversal to find relevant weights

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > +static struct commit *extract_merge_to_queue(struct commit_list **merges) > +{ > + assert(merges); > + > + struct commit_list *p, *q; > + struct commit *found; > + "gcc -Werror -Wdecl-after-statement" will barf at this. -- To unsubscribe

Re: [RFC PATCH, WAS: "weird diff output?" v2 1/2] xdiff: add recs_match helper function

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 3:46 PM, Jeff King wrote: > On Fri, Apr 15, 2016 at 02:56:21PM -0700, Jacob Keller wrote: > >> @@ -470,8 +477,9 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, >> long flags) { >>* the line next of the current change group,

Re: [PATCH v2 19/21] bisect: use a bottom-up traversal to find relevant weights

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > The idea is to reverse the DAG and perform a traversal > starting on all sources of the reversed DAG. Please clarify what you mean by "sources" here. Those who read log message in Git context would know that you mean the commit graph by "DAG", and

Re: [RFC PATCH, WAS: "weird diff output?" v2 1/2] xdiff: add recs_match helper function

2016-04-15 Thread Jeff King
On Fri, Apr 15, 2016 at 02:56:21PM -0700, Jacob Keller wrote: > @@ -470,8 +477,9 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, > long flags) { >* the line next of the current change group, shift > forward >* the group. >

Re: Default authentication over https?

2016-04-15 Thread Jeff King
On Fri, Apr 15, 2016 at 06:21:20PM -0400, Jeff King wrote: > I think we can take that down to _two_ requests pretty easily. We know > in the very first request that the server told us something like: > > < WWW-Authenticate: Basic realm="GitHub" > > but curl doesn't remember that. However, we

Re: [PATCH v2 18/21] bisect: prepare for different algorithms based on find_all

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > This is a preparation commit with copy-and-paste involved. > The function do_find_bisection() is changed and copied to > two almost similar functions compute_all_weights() and > compute_relevant_weights(). > > The function compute_relevant_weights() stops

Re: Default authentication over https?

2016-04-15 Thread Jeff King
On Thu, Apr 14, 2016 at 05:32:16PM -0400, Isaac Levy wrote: > After the authenticated request, curl says it's keeping the connection > open, but the next fetch seems to do two handshakes again. The > unauthenticated request closes the connection, so the 2nd handshake is > forced, but I'm not

Re: [PATCH v2 17/21] bisect: rename count_distance() to compute_weight()

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > Let us use the term "weight" for the number of ancestors > of each commit, and "distance" for the number > min{weight, #commits - weight}. (Bisect finds the commit > with maximum distance.) > > In these terms, "count_distance()" is the wrong name of > the

Re: [PATCH v2 16/21] bisect: make total number of commits global

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > The total number of commits in a bisect process is a property of > the bisect process. Making this property global helps to make the code > clearer. OK. > > Signed-off-by: Stephan Beyer > --- > bisect.c | 74 >

Re: [PATCH] Adding list of p4 jobs to git commit message

2016-04-15 Thread Luke Diamand
On 15 April 2016 at 21:27, Junio C Hamano wrote: > Jan Durovec writes: > >> --- > > A few issues. Please: > > (1) Sign-off your work. > > (2) Try to find those who are familiar with the area and Cc them. > > "git shortlog -s -n --since=18.months

Re: [PATCH v2 15/21] bisect: introduce distance_direction()

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > We introduce the concept of rising and falling distances > (in addition to a halfway distance). > This will be useful in subsequent commits. > > Signed-off-by: Stephan Beyer > --- > bisect.c | 33 +++-- > 1

Re: [PATCH v2 13/21] bisect: use commit instead of commit list as arguments when appropriate

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > It makes no sense that the argument for count_distance() and > halfway() is a commit list when only its first commit is relevant. > > Signed-off-by: Stephan Beyer > --- Makes sense (modulo perhaps s/elem/commit/). > bisect.c | 16

Re: [PATCH v2 14/21] bisect: extract get_distance() function from code duplication

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > Signed-off-by: Stephan Beyer > --- > bisect.c | 16 ++-- > 1 file changed, 10 insertions(+), 6 deletions(-) Nice. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to

Re: [PATCH v2 12/21] bisect: replace clear_distance() by unique markers

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > @@ -43,15 +43,17 @@ static int count_distance(struct commit_list *entry) > int nr = 0; > struct commit_list *todo = NULL; > commit_list_append(entry->item, ); > + marker++; > > while (todo) { > struct commit

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 2:44 PM, Junio C Hamano wrote: > Jacob Keller writes: > What you have is a pure developer support; aim to come up with "good enough" way, giving developers an easier way to experiment with, and remove it before the

[RFC PATCH, WAS: "weird diff output?" v2 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
From: Stefan Beller In order to produce the smallest possible diff and combine several diff hunks together, we implement a heuristic from GNU Diff which moves diff hunks forward as far as possible when we find common context above and below a diff hunk. This sometimes

[RFC PATCH, WAS: "weird diff output?" v2 0/2] implement empty line diff chunk heuristic

2016-04-15 Thread Jacob Keller
From: Jacob Keller Second version of my series with a few more minor fixups. I left the diff command line and configuration option alone for now, suspecting that long term we either (a) remove it or (b) use a gitattribute, so there is no reason to bikeshed the name or its

[RFC PATCH, WAS: "weird diff output?" v2 1/2] xdiff: add recs_match helper function

2016-04-15 Thread Jacob Keller
From: Jacob Keller It is a common pattern in xdl_change_compact to check that hashes and strings match. The resulting code to perform this change causes very long lines and makes it hard to follow the intention. Introduce a helper function recs_match which performs both

Re: [PATCH v2 11/21] bisect: use struct node_data array instead of int array

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > This is a preparation for subsequent changes. > During a bisection process, we want to augment commits with > further information to improve speed. > > Signed-off-by: Stephan Beyer > --- Makes sense. -- To unsubscribe from this list:

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Junio C Hamano
Jacob Keller writes: >>> What you have is a pure developer support; aim to come up with "good >>> enough" way, giving developers an easier way to experiment with, and >>> remove it before the feature is shipped to the end user. > > What are your thoughts on adding this do

Re: [PATCH v2 10/21] bisect: get rid of recursion in count_distance()

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > Large repositories with a huge amount of merge commits in the > bisection process could lead to stack overflows in git bisect. > In order to prevent this, this commit uses an *iterative* version > for counting the number of ancestors of a commit. Yay! >

Re: [PATCH v2 09/21] bisect: make algorithm behavior independent of DEBUG_BISECT

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > If DEBUG_BISECT is set to 1, bisect does not only show debug > information but also changes the algorithm behavior: halfway() > is always false. > > This commit makes the algorithm independent of DEBUG_BISECT. > > Signed-off-by: Stephan Beyer

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 2:15 PM, Jacob Keller wrote: > On Fri, Apr 15, 2016 at 1:30 PM, Junio C Hamano wrote: >> Jacob Keller writes: >> >>> On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: >>> I

Re: [PATCH v2 08/21] bisect: make bisect compile if DEBUG_BISECT is set

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > Setting the macro DEBUG_BISECT to 1 enables debugging information > for the bisect algorithm. The code did not compile due to struct > changes. > > Signed-off-by: Stephan Beyer > --- Thanks. This is something that we should do as a

Re: [PATCH v2 07/21] bisect: plug the biggest memory leak

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > Signed-off-by: Stephan Beyer > --- > bisect.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/bisect.c b/bisect.c > index 7996c29..901e4d3 100644 > --- a/bisect.c > +++ b/bisect.c > @@ -984,6 +984,8 @@ int

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 1:30 PM, Junio C Hamano wrote: > Jacob Keller writes: > >> On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: >> >>> I actually do not think these knobs should exist when the code is >>> mature enough to

Re: [PATCH v2 06/21] bisect: add test for the bisect algorithm

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > +test_expect_success 'bisect algorithm works in linear history with an odd > number of commits' ' > + git bisect start A7 && > + git bisect next && > + test_cmp_rev HEAD A3 A4 > +' > + > +test_expect_success 'bisect algorithm works in linear

Re: [PATCH 0/6] Miscellaneous merge fixes

2016-04-15 Thread Elijah Newren
Hi, On Tue, Apr 12, 2016 at 6:23 PM, Junio C Hamano wrote: > Elijah Newren writes: > >> Elijah Newren (6): >> Remove duplicate code >> Avoid checking working copy when creating a virtual merge base >> Add merge testcases for when index doesn't match

Re: [PATCH v4 15/16] branch: use ref-filter printing APIs

2016-04-15 Thread Jeff King
On Sat, Apr 16, 2016 at 01:57:23AM +0530, Karthik Nayak wrote: > I had a look at your patch and even tested it, seems solid, I like how you > integrated all these atoms together under refname_atom_parser_internal(). > I'm squashing this in, for my re-roll. Thanks. Great, thanks for picking it

Re: [PATCH v2 05/21] t6030: generalize test to not rely on current implementation

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > The bisect algorithm allows different outcomes if, for example, > the number of commits between a good and a bad commit is even. > The current test relies on a specific behavior (for example, > the behavior of the halfway() implementation). By disabling >

Re: [PATCH v2 04/21] t: use test_cmp_rev() where appropriate

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > test_cmp_rev() from t/test-lib-functions.sh is used to make many > tests clearer. > > Signed-off-by: Stephan Beyer > --- > > Notes: > This change is in some way independent of the bisect topic but > the next patch is based on

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Junio C Hamano
Jacob Keller writes: > On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: > >> I actually do not think these knobs should exist when the code is >> mature enough to be shipped to the end users. >> >> Use "diff.compactionHeuristics = " as an opaque

Re: [PATCH v4 15/16] branch: use ref-filter printing APIs

2016-04-15 Thread Karthik Nayak
On Fri, Apr 15, 2016 at 2:06 AM, Jeff King wrote: > On Thu, Apr 14, 2016 at 04:05:30PM -0400, Jeff King wrote: > >> It looks like that's a little tricky for %(upstream) and %(push), which >> have extra tracking options, but it's pretty trivial for %(symref): >> [...] >> I suspect

Re: [PATCH] Adding list of p4 jobs to git commit message

2016-04-15 Thread Junio C Hamano
Jan Durovec writes: > --- A few issues. Please: (1) Sign-off your work. (2) Try to find those who are familiar with the area and Cc them. "git shortlog -s -n --since=18.months --no-merges git-p4.py" may help. (3) Follow the style of existing commits when

Re: [PATCH v4 03/16] index-helper: new daemon for caching index and related stuff

2016-04-15 Thread David Turner
On Fri, 2016-04-15 at 18:25 +0700, Duy Nguyen wrote: > On Thu, Apr 14, 2016 at 1:47 AM, David Turner < > dtur...@twopensource.com> wrote: > > > > + fd = unix_stream_connect(socket_path); > > > > + if (refresh_cache) { > > > > + ret = write_in_full(fd, "refresh", 8) != 8;

Re: [PATCH v4 03/16] index-helper: new daemon for caching index and related stuff

2016-04-15 Thread David Turner
On Thu, 2016-04-14 at 17:04 +0700, Duy Nguyen wrote: > On Thu, Apr 14, 2016 at 1:47 AM, David Turner < > dtur...@twopensource.com> wrote: > > On Wed, 2016-04-13 at 20:43 +0700, Duy Nguyen wrote: > > > On Wed, Apr 13, 2016 at 7:32 AM, David Turner < > > > dtur...@twopensource.com> wrote: > > > >

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 1:06 PM, Junio C Hamano wrote: > Stefan Beller writes: > >>> +diff.emptyLineHeuristic:: >> >> I was looking at the TODO here and thought about the name: >> It should not encode the `emptyLine` into the config option as >> it is only

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 12:57 PM, Stefan Beller wrote: > I was looking at the TODO here and thought about the name: > It should not encode the `emptyLine` into the config option as > it is only one of many heuristics. > > It should be something like

Re: [RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Junio C Hamano
Stefan Beller writes: >> +diff.emptyLineHeuristic:: > > I was looking at the TODO here and thought about the name: > It should not encode the `emptyLine` into the config option as > it is only one of many heuristics. > > It should be something like

Re: [PATCH v2 03/21] t/test-lib-functions.sh: generalize test_cmp_rev

2016-04-15 Thread Junio C Hamano
Stephan Beyer writes: > test_cmp_rev() took exactly two parameters, the expected revision > and the revision to test. This commit generalizes this function > such that it takes any number of at least two revisions: the > expected one and a list of actual ones. The function

Re: 'git mv' doesn't move submodule if it's in a subdirectory

2016-04-15 Thread Albin Otterhäll
On 2016-04-15 19:18, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 1:14 AM, Albin Otterhäll wrote: >> I've a submodule located in a subdirectory >> ({git_rep}/home/{directory}/{submodule}), and I wanted to move the whole >> directory up a level

Re: [PATCH/RFC 0/6] fetch with refspec

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 12:19 PM, David Turner wrote: > We've got a lot of refs, but pretty frequently we only want to fetch > one. It's silly for the server to send a bunch of refs that the client > is just going to ignore. Here are some patches that fix that. > > Let

[PATCH/RFC 3/6] http-backend: handle refspec argument

2016-04-15 Thread David Turner
Allow clients to pass a "refspec" parameter through to upload-pack; upload-pack will only advertise refs which match that refspec. Signed-off-by: David Turner --- http-backend.c | 9 +++ upload-pack.c | 81

[PATCH/RFC 4/6] transport: add refspec list parameters to functions

2016-04-15 Thread David Turner
Add parameters for a list of refspecs to transport_get_remote_refs and get_refs_list. These parameters are presently unused -- soon, we will use them to implement fetches which only learn about a subset of refs. Signed-off-by: David Turner --- builtin/clone.c | 2

[PATCH/RFC 1/6] http-backend: use argv_array functions

2016-04-15 Thread David Turner
Signed-off-by: David Turner --- http-backend.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/http-backend.c b/http-backend.c index 8870a26..a4f0066 100644 --- a/http-backend.c +++ b/http-backend.c @@ -450,9 +450,7 @@ static void

[PATCH/RFC 6/6] clone: send refspec for single-branch clones

2016-04-15 Thread David Turner
For single-branch clones (when we know in advance what the remote branch name will be), send a refspec so that the server doesn't tell us about any other refs. Signed-off-by: David Turner --- builtin/clone.c | 16 +++-

[PATCH/RFC 0/6] fetch with refspec

2016-04-15 Thread David Turner
We've got a lot of refs, but pretty frequently we only want to fetch one. It's silly for the server to send a bunch of refs that the client is just going to ignore. Here are some patches that fix that. Let me know if this seems reasonable. (and I'll start in on another round of index-helper as

[PATCH/RFC 2/6] remote-curl.c: fix variable shadowing

2016-04-15 Thread David Turner
The local variable 'options' was shadowing a global of the same name. Signed-off-by: David Turner --- remote-curl.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/remote-curl.c b/remote-curl.c index 15e48e2..b9b6a90 100644 ---

[PATCH/RFC 5/6] fetch: pass refspec to http server

2016-04-15 Thread David Turner
When fetching over http, send the requested refspec to the server. The server will then only send refs matching that refspec. It is permitted for old servers to ignore that parameter, and the client will automatically handle this. When the server has many refs, and the client only wants a few,

[PATCH] mv: allow moving nested submodules

2016-04-15 Thread Stefan Beller
When directories are moved using `git mv` all files in the directory have been just moved, but no further action was taken on them. This was done by assigning the mode = WORKING_DIRECTORY to the files inside a moved directory. submodules however need to update their link to the git directory as

Re: [RFC PATCH, WAS: "weird diff output?" 1/2] xdiff: add xdl_hash_and_recmatch helper function

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 10:25 AM, Junio C Hamano wrote: > Jacob Keller writes: > >> From: Jacob Keller >> >> It is a common pattern in xdl_change_compact to check that hashes and >> strings match. The resulting code to perform

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 10:33 AM, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 10:27 AM, Junio C Hamano wrote: >> Stefan Beller writes: >> >>> Actually we would only need to have the empty line count in the >>> second loop as the

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 10:10 AM, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 10:02 AM, Stefan Beller wrote: >>> @@ -458,11 +458,11 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, >>> long flags) { >>> * the group. >>>

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Jacob Keller
On Fri, Apr 15, 2016 at 10:02 AM, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 9:51 AM, Jacob Keller > wrote: >> From: Jacob Keller >> >> I took up Stefan's patch, and modified it to resolve a couple issues. I >> also

Re: [PATCH v4 11/16] ref-filter: introduce refname_atom_parser()

2016-04-15 Thread Karthik Nayak
On Fri, Apr 15, 2016 at 2:13 AM, Jeff King wrote: > On Sun, Apr 10, 2016 at 12:15:10AM +0530, Karthik Nayak wrote: > >> +static void refname_atom_parser(struct used_atom *atom, const char *arg) >> +{ >> + if (!arg) >> + atom->u.refname.option = R_NORMAL; >> +

Re: 'git mv' doesn't move submodule if it's in a subdirectory

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 11:21 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> I think I can reproduce the problem. A regression test (which currently >> fails) >> could look like > > Thanks. I however do not think this is a regression. > > Changes

Re: 'git mv' doesn't move submodule if it's in a subdirectory

2016-04-15 Thread Junio C Hamano
Stefan Beller writes: > I think I can reproduce the problem. A regression test (which currently fails) > could look like Thanks. I however do not think this is a regression. Changes around 0656781f (mv: update the path entry in .gitmodules for moved submodules, 2013-08-06)

Re: 'git mv' doesn't move submodule if it's in a subdirectory

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 10:18 AM, Stefan Beller wrote: > On Fri, Apr 15, 2016 at 1:14 AM, Albin Otterhäll wrote: >> I've a submodule located in a subdirectory >> ({git_rep}/home/{directory}/{submodule}), and I wanted to move the whole >> directory up a

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Junio C Hamano
Stefan Beller writes: > I think we need to be aggressive to find adjacent groups and only after > that is done we should think about optimizing look? OK. I was just gauging to see if those involved in the codepath thought things through, and apparently you did, so I'm happy

Re: Parallel checkout (Was Re: 0 bot for Git)

2016-04-15 Thread Jeff King
On Fri, Apr 15, 2016 at 10:31:39AM -0700, Junio C Hamano wrote: > Last time I checked, I think the accesses to attributes from the > convert.c thing was one of the things that are cumbersome to make > safe in multi-threaded world. Multi-threaded grep has the same problem. I think we started with

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 10:27 AM, Junio C Hamano wrote: > Stefan Beller writes: > >> Actually we would only need to have the empty line count in the >> second loop as the first loop shifted it as much up(backwards) as >> possible, such that the hunk sits on

Re: Parallel checkout (Was Re: 0 bot for Git)

2016-04-15 Thread Junio C Hamano
Jeff King writes: > On Fri, Apr 15, 2016 at 01:18:46PM +0200, Christian Couder wrote: > >> On Fri, Apr 15, 2016 at 11:51 AM, Duy Nguyen wrote: >> > On Fri, Apr 15, 2016 at 12:04:49AM +0200, Christian Couder wrote: >> >> >> >> There is a draft of an article

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Junio C Hamano
Stefan Beller writes: > Actually we would only need to have the empty line count in the > second loop as the first loop shifted it as much up(backwards) as > possible, such that the hunk sits on one end of the movable > range. The second loop would iterate over the whole

Re: [RFC PATCH, WAS: "weird diff output?" 1/2] xdiff: add xdl_hash_and_recmatch helper function

2016-04-15 Thread Junio C Hamano
Jacob Keller writes: > From: Jacob Keller > > It is a common pattern in xdl_change_compact to check that hashes and > strings match. The resulting code to perform this change causes very > long lines and makes it hard to follow the intention.

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 10:02 AM, Stefan Beller wrote: >> @@ -458,11 +458,11 @@ int xdl_change_compact(xdfile_t *xdf, xdfile_t *xdfo, >> long flags) { >> * the group. >> */ >> while (ixs > 0 &&

Re: 'git mv' doesn't move submodule if it's in a subdirectory

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 1:14 AM, Albin Otterhäll wrote: > I've a submodule located in a subdirectory > ({git_rep}/home/{directory}/{submodule}), and I wanted to move the whole > directory up a level ({git_rep}/{directory}/{submodule}). But when I > used 'git mv {directory}

Re: Git mascot

2016-04-15 Thread Jean-Noël AVILA
Le vendredi 15 avril 2016, 11:41:52 Christian Howe a écrit : > There has been talk of a git mascot a while back in 2005. Some people > mentioned a fish or a turtle. Since all the great open source projects > like Linux or RethinkDB have a cute mascot, git definitely needs one > as well. A mascot

Re: [PATCH] Move test-* to t/helper/ subdirectory

2016-04-15 Thread Junio C Hamano
Junio C Hamano writes: > Nguyễn Thái Ngọc Duy writes: > >> This keeps top dir a bit less crowded. And because these programs are >> for testing purposes, it makes sense that they stay somewhere in t/ > > But leaves many *.o files after "make clean". Even

Re: [RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Stefan Beller
On Fri, Apr 15, 2016 at 9:51 AM, Jacob Keller wrote: > From: Jacob Keller > > I took up Stefan's patch, and modified it to resolve a couple issues. I > also tried to implement the suggestions from Junio's review, as well as > the suggestions I

[RFC PATCH, WAS: "weird diff output?" 1/2] xdiff: add xdl_hash_and_recmatch helper function

2016-04-15 Thread Jacob Keller
From: Jacob Keller It is a common pattern in xdl_change_compact to check that hashes and strings match. The resulting code to perform this change causes very long lines and makes it hard to follow the intention. Introduce a helper function xdl_hash_and_recmatch which

[RFC PATCH, WAS: "weird diff output?" 2/2] xdiff: implement empty line chunk heuristic

2016-04-15 Thread Jacob Keller
From: Stefan Beller In order to produce the smallest possible diff and combine several diff hunks together, we implement a heuristic from GNU Diff which moves diff hunks forward as far as possible when we find common context above and below a diff hunk. This sometimes

[RFC PATCH, WAS: "weird diff output?" 0/2] implement better chunk heuristics

2016-04-15 Thread Jacob Keller
From: Jacob Keller I took up Stefan's patch, and modified it to resolve a couple issues. I also tried to implement the suggestions from Junio's review, as well as the suggestions I had. It appears to produce equivalent output as Jeff's script. This version is still

Re: [PATCH] Extend runtime prefix computation

2016-04-15 Thread Junio C Hamano
Michael Weiser writes: > Make git fully relocatable at runtime extending the runtime prefix > calculation. Handle absolute and relative paths in argv0. Handle no path > at all in argv0 in a system-specific manner. Replace assertions with > initialised variables and checks

Re: Parallel checkout (Was Re: 0 bot for Git)

2016-04-15 Thread Jeff King
On Fri, Apr 15, 2016 at 01:18:46PM +0200, Christian Couder wrote: > On Fri, Apr 15, 2016 at 11:51 AM, Duy Nguyen wrote: > > On Fri, Apr 15, 2016 at 12:04:49AM +0200, Christian Couder wrote: > >> > >> There is a draft of an article about the first part of the Contributor > >>

  1   2   >