[PATCH v2] wt-status.c: set commitable bit if there is a meaningful merge.

2016-02-16 Thread Stephen P. Smith
The 'commit --dry-run' and 'commit' return values differed if a conflicted merge had been resolved and the commit would be the same as the parent. Update show_merge_in_progress to set the commitable bit if conflicts have been resolved and a merge is in progress. Signed-off-by: Stephen P. Smith

Re: [PATCH] wt-status.c: set commitable bit if there is a meaningful merge.

2016-02-16 Thread Stephen & Linda Smith
On Tuesday, February 16, 2016 07:33:54 PM Junio C Hamano wrote: > "Stephen P. Smith" writes: > > > The 'commit --dry-run' and commit return values differed if a > > conflicted merge had been resolved and the commit would be the same as > > the parent. > > > > Update

Re: [PATCH v3 0/2] merge-recursive: option to disable renames

2016-02-16 Thread Felipe Gonçalves Assis
On 16 February 2016 at 23:37, Eric Sunshine wrote: > On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis > wrote: >> No more renames option. rename-threshold enables renames. > > Can you add some tests? Off the top of my head, I'd expect to

Re: [PATCH] wt-status.c: set commitable bit if there is a meaningful merge.

2016-02-16 Thread Junio C Hamano
"Stephen P. Smith" writes: > The 'commit --dry-run' and commit return values differed if a > conflicted merge had been resolved and the commit would be the same as > the parent. > > Update show_merge_in_progress to set the commitable bit if conflicts > have been resolved and a

[PATCH v4 0/2] merge-recursive: option to disable renames

2016-02-16 Thread Felipe Gonçalves Assis
Incorporate documentation input from Eric Sunshine. Fix missing signoff. The first part is unchanged. No tests are included for now. This work is being done in parallel and should be properly included in future proposals. Felipe Gonçalves Assis (2): merge-recursive: option to disable renames

[PATCH v4 1/2] merge-recursive: option to disable renames

2016-02-16 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 --- Documentation/merge-strategies.txt | 6 ++ merge-recursive.c | 7 +++

[PATCH v4 2/2] merge-recursive: more consistent interface

2016-02-16 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 --- Documentation/merge-strategies.txt | 10 ++ merge-recursive.c | 5 - 2 files changed,

Re: [PATCH v3 1/2] merge-recursive: option to disable renames

2016-02-16 Thread Felipe Gonçalves Assis
On 16 February 2016 at 23:41, Eric Sunshine wrote: > On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis > wrote: >> The recursive strategy turns on rename detection by default. Add a >> strategy option to disable rename detection even for

[PATCH] git-cvsserver.perl: fix typo

2016-02-16 Thread GyuYong Jung
Signed-off-by: GyuYong Jung --- git-cvsserver.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-cvsserver.perl b/git-cvsserver.perl index 95e69b1..02c0445 100755 --- a/git-cvsserver.perl +++ b/git-cvsserver.perl @@ -2664,7 +2664,7 @@ sub

Re: [PATCH v3 2/2] merge-recursive: more consistent interface

2016-02-16 Thread Eric Sunshine
On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis wrote: > Add strategy option find-renames, following git-diff interface. This > makes the option rename-threshold redundant. Missing sign-off. > --- > diff --git a/Documentation/merge-strategies.txt >

Re: [PATCH v3 1/2] merge-recursive: option to disable renames

2016-02-16 Thread Eric Sunshine
On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis wrote: > 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 >

Re: [PATCH v3 0/2] merge-recursive: option to disable renames

2016-02-16 Thread Eric Sunshine
On Tue, Feb 16, 2016 at 8:11 PM, Felipe Gonçalves Assis wrote: > No more renames option. rename-threshold enables renames. Can you add some tests? Off the top of my head, I'd expect to see at least three new tests: 1. --no-renames works as expected 2. last wins in

[PATCH v3 1/2] merge-recursive: option to disable renames

2016-02-16 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 --- Documentation/merge-strategies.txt | 6 ++ merge-recursive.c | 7 +++

[PATCH v3 0/2] merge-recursive: option to disable renames

2016-02-16 Thread Felipe Gonçalves Assis
No more renames option. rename-threshold enables renames. detect_rename is now a simple boolean. Its value is no longer linked to DIFF_ANYTHING symbol. A second optional patch is included, teaching merge-recursive to take "find-renames[=]" as well, for consistency. Felipe Gonçalves Assis (2):

[PATCH v3 2/2] merge-recursive: more consistent interface

2016-02-16 Thread Felipe Gonçalves Assis
Add strategy option find-renames, following git-diff interface. This makes the option rename-threshold redundant. --- A minor note git diff --check complains about an indent with spaces here, but I think I did the right thing: indented with tabs and aligned with spaces. If desired, I can align

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 04:28:10PM -0800, Junio C Hamano wrote: > Jeff King writes: > > > On Tue, Feb 16, 2016 at 04:12:08PM -0800, Junio C Hamano wrote: > > > >> > To be honest, though, I am now on the fence, considering the possible > >> > whitespace issue. > >> > >> Certainly

Re: [PATCH 2/3] pager: factor out a helper to prepare a child process to run the pager

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 03:49:55PM -0800, Junio C Hamano wrote: > > And if you put the git_pager() call inside prepare_pager_args (which I > > agree would be cleaner), we just have: > > > > void prepare_pager_args(struct child_process *pager_process); > > > > which is pretty self-explanatory

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Junio C Hamano
Jeff King writes: > On Tue, Feb 16, 2016 at 04:12:08PM -0800, Junio C Hamano wrote: > >> > To be honest, though, I am now on the fence, considering the possible >> > whitespace issue. >> >> Certainly not having to see s[0]->buf over and over is a huge win ;-). >> >> Is the

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 04:12:08PM -0800, Junio C Hamano wrote: > > To be honest, though, I am now on the fence, considering the possible > > whitespace issue. > > Certainly not having to see s[0]->buf over and over is a huge win ;-). > > Is the "whitespace issue" a big deal? Does it involve

Re: [PATCH v2] merge-recursive: option to disable renames

2016-02-16 Thread Junio C Hamano
"Felipe Gonçalves Assis" writes: > @@ -482,10 +482,13 @@ static struct string_list *get_renames(struct > merge_options *o, > struct diff_options opts; > > renames = xcalloc(1, sizeof(struct string_list)); > + if (!o->detect_rename) > +

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Junio C Hamano
Jeff King writes: >> > Should we? Or perhaps: might we? If the answer is yes, we are likely >> > better off with strbuf_split, because then we are only a strbuf_trim() >> > away from making that work. >> >> I also considered the issue of embedded whitespace very early on when >>

Re: [PATCH 00/20] Delete directories left empty after ref deletion

2016-02-16 Thread Junio C Hamano
Michael Haggerty writes: > Previously, we were pretty sloppy about leaving empty directories > behind (under both $GIT_DIR/refs and $GIT_DIR/logs) when deleting > references. Such directories could accumulate essentially forever. > It's true that `pack-refs` deletes

Re: [PATCH 2/3] pager: factor out a helper to prepare a child process to run the pager

2016-02-16 Thread Junio C Hamano
Jeff King writes: > On Tue, Feb 16, 2016 at 03:06:56PM -0800, Junio C Hamano wrote: > >> diff --git a/pager.c b/pager.c >> index 5dbcc5a..1406370 100644 >> --- a/pager.c >> +++ b/pager.c >> @@ -53,6 +53,23 @@ const char *git_pager(int stdout_is_tty) >> return pager; >> } >>

Re: [PATCH 01/20] safe_create_leading_directories_const(): preserve errno

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 02:22:14PM +0100, Michael Haggerty wrote: > Theoretically, free() is allowed to change errno. So preserve the errno > from safe_create_leading_directories() across the call to free(). I wondered if this was actually a problem in practice. POSIX forbids recreational

Re: [PATCH] merge-recursive: option to disable renames

2016-02-16 Thread Junio C Hamano
Felipe Gonçalves Assis writes: > Just a note: In git-diff, there is no "--renames". Instead, renames > are enabled by the "--find-renames[=]" option. > > 1. Do you think "rename-threshold=" should enable renames? I do not think it matters in practice, but if you have

Re: [PATCH] wt-status.c: set commitable bit if there is a meaningful merge.

2016-02-16 Thread Stephen & Linda Smith
On Tuesday, February 16, 2016 04:26:38 PM Stephen & Linda Smith wrote: > On Tuesday, February 16, 2016 01:54:48 PM Junio C Hamano wrote: > > "Philip Oakley" writes: > > > > >>It appeared that the conditional for 'Reject an attempt to record a > > >>non-merge empty

Re: [PATCH] wt-status.c: set commitable bit if there is a meaningful merge.

2016-02-16 Thread Stephen & Linda Smith
On Tuesday, February 16, 2016 08:20:43 AM Philip Oakley wrote: > From: "Stephen P. Smith" > > The 'commit --dry-run' and commit return values differed if a > > Should this have quotes around the second 'commit' as they both refer to the > command, rather than the action? OK >

[PATCH v2] merge-recursive: option to disable renames

2016-02-16 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 --- Following Hamano's review, this patch includes a strategy option "renames" and simplifies the

Re: [PATCH 2/3] pager: factor out a helper to prepare a child process to run the pager

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 03:06:56PM -0800, Junio C Hamano wrote: > diff --git a/pager.c b/pager.c > index 5dbcc5a..1406370 100644 > --- a/pager.c > +++ b/pager.c > @@ -53,6 +53,23 @@ const char *git_pager(int stdout_is_tty) > return pager; > } > > +void prepare_pager_args(struct

Re: [PATCH] wt-status.c: set commitable bit if there is a meaningful merge.

2016-02-16 Thread Stephen & Linda Smith
On Tuesday, February 16, 2016 01:54:48 PM Junio C Hamano wrote: > "Philip Oakley" writes: > > >>It appeared that the conditional for 'Reject an attempt to record a > >>non-merge empty commit without * explicit --allow-empty.' could be > >>simplified after adding

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 05:49:19PM -0500, Eric Sunshine wrote: > On Tue, Feb 16, 2016 at 5:34 PM, Jeff King wrote: > > On Tue, Feb 16, 2016 at 04:09:53PM -0500, Eric Sunshine wrote: > >> My initial reaction was negative due to the heavy review burden this > >> series has demanded

Re: [PATCH v5 02/15] branch: report errors in tracking branch setup

2016-02-16 Thread Junio C Hamano
Patrick Steinhardt writes: > if (rebasing) { > strbuf_reset(); > strbuf_addf(, "branch.%s.rebase", local); > - git_config_set(key.buf, "true"); > + if (git_config_set(key.buf, "true") < 0) > + goto out_err;

[PATCH 2/3] pager: factor out a helper to prepare a child process to run the pager

2016-02-16 Thread Junio C Hamano
When running a pager, we need to run the program git_pager() gave us, but we need to make sure we spawn it via the shell (i.e. it is valid to say PAGER='less -S', for example) and give default values to $LESS and $LV environment variables. Factor out these details to a separate helper function.

[PATCH 1/3] pager: lose a separate argv[]

2016-02-16 Thread Junio C Hamano
These days, using the embedded args array in the child_process structure is the norm. Follow that practice. Signed-off-by: Junio C Hamano --- pager.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pager.c b/pager.c index 070dc11..5dbcc5a 100644 ---

[PATCH 0/3] fix "v"iew subcommand in "git am -i"

2016-02-16 Thread Junio C Hamano
The 'v'iew subcommand of the interactive mode of "git am -i" was broken by the rewrite to C we did at around 2.6.0 timeframe at 7ff26832 (builtin-am: implement -i/--interactive, 2015-08-04); we used to spawn the pager via the shell, accepting things like PAGER='less -S' in the

[PATCH 3/3] am -i: fix "v"iew

2016-02-16 Thread Junio C Hamano
The 'v'iew subcommand of the interactive mode of "git am -i" was broken by the rewrite to C we did at around 2.6.0 timeframe at 7ff26832 (builtin-am: implement -i/--interactive, 2015-08-04); we used to spawn the pager via the shell, accepting things like PAGER='less -S' in the

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Eric Sunshine
On Tue, Feb 16, 2016 at 5:34 PM, Jeff King wrote: > On Tue, Feb 16, 2016 at 04:09:53PM -0500, Eric Sunshine wrote: >> My initial reaction was negative due to the heavy review burden this >> series has demanded thus far, however, my mind was changing even as I >> composed the above

Re: [PATCH] merge-recursive: option to disable renames

2016-02-16 Thread Felipe Gonçalves Assis
On 16 February 2016 at 19:49, Junio C Hamano wrote: > "Felipe Gonçalves Assis" writes: > >> +no-renames;; >> + Turn off rename detection. >> + See also linkgit:git-diff[1] `--no-renames`. > > Even though by default for merge-recursive the

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 04:09:53PM -0500, Eric Sunshine wrote: > My initial reaction was negative due to the heavy review burden this > series has demanded thus far, however, my mind was changing even as I > composed the above response. In retrospect, I think I'd be okay seeing > a v6, for the

Re: [BUG] git-log: tracking deleted file in a repository with multiple "initial commit" histories

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 01:24:29PM -0800, Brian Norris wrote: > On Tue, Feb 16, 2016 at 03:45:57PM -0500, Jeff King wrote: > > See the section on History Simplification in git-log. But basically, > > when you specify a pathspec, git does not traverse side branches that > > had no effect on the

Re: [PATCH v4 3/3] config: add '--show-origin' option to print the origin of a config value

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 10:14:45PM +, Ramsay Jones wrote: > > I think it's more than that one-liner. This patch shows "type:name" > > verbatim from what is passed into do_config_from_file, as does the error > > message. If they are going to have different output formats (e.g., > > "" versus

Re: [PATCH v4 3/3] config: add '--show-origin' option to print the origin of a config value

2016-02-16 Thread Ramsay Jones
On 16/02/16 17:38, Jeff King wrote: > On Tue, Feb 16, 2016 at 04:46:07PM +, Ramsay Jones wrote: > >>> OK, I am happy to add the extra code. >> >> Unless I've missed something (quite possible), this patch does not >> need to change. (you have (both) convinced me that your current >>

Re: [PATCH] merge-recursive: option to disable renames

2016-02-16 Thread Junio C Hamano
Junio C Hamano writes: > "Felipe Gonçalves Assis" writes: > >> +no-renames;; >> +Turn off rename detection. >> +See also linkgit:git-diff[1] `--no-renames`. > > Even though by default for merge-recursive the rename detection is > on, if we

Re: [PATCH v4 2/3] config: add 'type' to config_source struct that identifies config type

2016-02-16 Thread Ramsay Jones
On 15/02/16 17:42, Jeff King wrote: > On Mon, Feb 15, 2016 at 11:17:45AM +0100, larsxschnei...@gmail.com wrote: > >> From: Lars Schneider >> >> Use the config type to print more detailed error messages that inform >> the user about the origin of a config error (file,

Re: [PATCH v4 20/21] refs: add LMDB refs storage backend

2016-02-16 Thread David Turner
On Mon, 2016-02-15 at 16:57 +0700, Duy Nguyen wrote: > On Sun, Feb 14, 2016 at 7:04 PM, Duy Nguyen > wrote: > > On Sat, Feb 6, 2016 at 2:44 AM, David Turner < > > dtur...@twopensource.com> wrote: > > > +static char *get_refdb_path(const char *base) > > > +{ > > > + static

Re: [PATCH] wt-status.c: set commitable bit if there is a meaningful merge.

2016-02-16 Thread Junio C Hamano
"Philip Oakley" writes: >>It appeared that the conditional for 'Reject an attempt to record a >>non-merge empty commit without * explicit --allow-empty.' could be >>simplified after adding this patch. >> >>This change can't be propagated to the conditional

Re: [PATCH] merge-recursive: option to disable renames

2016-02-16 Thread Junio C Hamano
"Felipe Gonçalves Assis" writes: > +no-renames;; > + Turn off rename detection. > + See also linkgit:git-diff[1] `--no-renames`. Even though by default for merge-recursive the rename detection is on, if we are adding an option to control this aspect of the

Re: [PATCH v3 0/4] git remote improvements

2016-02-16 Thread Junio C Hamano
Thomas Gummerer writes: > Previous rounds are at $gmane/286214 and $gmane/286278. Thanks to > Peff and Eric for the reviews on the previous round. > > This version changes two checks in [1/4], and uses test_config in the > tests instead of calling git config directly.

Re: [PATCH] merge_blobs: use strbuf instead of manually-sized mmfile_t

2016-02-16 Thread Junio C Hamano
Jeff King writes: > Yeah, maybe. There were two reasons I avoided adding a test. > > One, I secretly hoped that by dragging my feet we could get consensus on > just ripping out merge-tree entirely. ;) > > Two, I'm not sure what the test output _should_ be. I think this case is >

Re: [BUG] git-log: tracking deleted file in a repository with multiple "initial commit" histories

2016-02-16 Thread Brian Norris
On Tue, Feb 16, 2016 at 03:45:57PM -0500, Jeff King wrote: > See the section on History Simplification in git-log. But basically, > when you specify a pathspec, git does not traverse side branches that > had no effect on the given pathspec. Thanks for the pointer. Is this done primarily for

Re: [PATCH +warn] Implement https public key pinning

2016-02-16 Thread Junio C Hamano
Jeff King writes: > On Mon, Feb 15, 2016 at 07:19:07PM -0800, Junio C Hamano wrote: > >> I suspect that "#else" is too agressive to bail out or something >> silly like that. >> >> Oh, I think I found it. >> >> @@ -216,6 +219,13 @@ static int http_options(const char *var, const

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Eric Sunshine
On Tue, Feb 16, 2016 at 3:49 PM, Jeff King wrote: > On Tue, Feb 16, 2016 at 03:12:29PM -0500, Eric Sunshine wrote: >> > Did you consider just using string_list_split for this? AFAICT, you >> > don't care about the results being strbufs themselves, and it would do >> > what you want

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 03:12:29PM -0500, Eric Sunshine wrote: > > Did you consider just using string_list_split for this? AFAICT, you > > don't care about the results being strbufs themselves, and it would do > > what you want without having to bother with patch 1. [...] > > > > Sorry to waltz

Re: [BUG] git-log: tracking deleted file in a repository with multiple "initial commit" histories

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 12:24:42PM -0800, Brian Norris wrote: > I'm not sure if this is a known behavior or a new bug report. I at least > couldn't find anyone mentioning this exact problem. > > I'm using a git repository that has multiple "inital commits" (i.e., a > few different directory

Re: [PATCH] merge_blobs: use strbuf instead of manually-sized mmfile_t

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 01:14:09PM +0100, Stefan Frühwirth wrote: > On 2016-02-16 at 06:50, Jeff King wrote: > >Yeah, maybe. There were two reasons I avoided adding a test. > > > >One, I secretly hoped that by dragging my feet we could get consensus on > >just ripping out merge-tree entirely. ;)

[BUG] git-log: tracking deleted file in a repository with multiple "initial commit" histories

2016-02-16 Thread Brian Norris
Hi, I'm not sure if this is a known behavior or a new bug report. I at least couldn't find anyone mentioning this exact problem. I'm using a git repository that has multiple "inital commits" (i.e., a few different directory trees were imported via svn-to-git as different branches) whose

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Eric Sunshine
On Tue, Feb 16, 2016 at 2:22 PM, Jeff King wrote: > On Wed, Feb 17, 2016 at 12:30:05AM +0530, Karthik Nayak wrote: >> Use the newly introduced strbuf_split_str_omit_term() rather than >> using strbuf_split_str() and manually removing the ',' terminator. >> >> Helped-by: Eric

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 02:22:32PM -0500, Jeff King wrote: > On Wed, Feb 17, 2016 at 12:30:05AM +0530, Karthik Nayak wrote: > > > Use the newly introduced strbuf_split_str_omit_term() rather than > > using strbuf_split_str() and manually removing the ',' terminator. > > > > Helped-by: Eric

Re: [PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Jeff King
On Wed, Feb 17, 2016 at 12:30:05AM +0530, Karthik Nayak wrote: > Use the newly introduced strbuf_split_str_omit_term() rather than > using strbuf_split_str() and manually removing the ',' terminator. > > Helped-by: Eric Sunshine > Signed-off-by: Karthik Nayak

[PATCH v5 11/12] ref-filter: introduce contents_atom_parser()

2016-02-16 Thread Karthik Nayak
Introduce contents_atom_parser() which will parse the '%(contents)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Also introduce body_atom_parser() and subject_atom_parser() for parsing atoms '%(body)' and '%(subject)' respectively.

[PATCH v5 12/12] ref-filter: introduce objectname_atom_parser()

2016-02-16 Thread Karthik Nayak
Introduce objectname_atom_parser() which will parse the '%(objectname)' atom and store information into the 'used_atom' structure based on the modifiers used along with the atom. Helped-by: Ramsay Jones Helped-by: Eric Sunshine

[PATCH v5 10/12] ref-filter: introduce remote_ref_atom_parser()

2016-02-16 Thread Karthik Nayak
Introduce remote_ref_atom_parser() which will parse the '%(upstream)' and '%(push)' atoms and store information into the 'used_atom' structure based on the modifiers used along with the corresponding atom. Helped-by: Ramsay Jones Helped-by: Eric Sunshine

[PATCH v5 02/12] ref-filter: use strbuf_split_str_omit_term()

2016-02-16 Thread Karthik Nayak
Use the newly introduced strbuf_split_str_omit_term() rather than using strbuf_split_str() and manually removing the ',' terminator. Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak --- ref-filter.c | 9 + 1 file changed, 1

[PATCH v5 05/12] ref-filter: introduce parsing functions for each valid atom

2016-02-16 Thread Karthik Nayak
Parsing atoms is done in populate_value(), this is repetitive and hence expensive. Introduce a parsing function which would let us parse atoms beforehand and store the required details into the 'used_atom' structure for further usage. Helped-by: Eric Sunshine Helped-by:

[PATCH v5 07/12] ref-filter: introduce parse_align_position()

2016-02-16 Thread Karthik Nayak
>From populate_value() extract parse_align_position() which given a string would give us the alignment position. This is a preparatory patch as to introduce prefixes for the %(align) atom and avoid redundancy in the code. Helped-by: Eric Sunshine Signed-off-by: Karthik

[PATCH v5 08/12] ref-filter: introduce align_atom_parser()

2016-02-16 Thread Karthik Nayak
Introduce align_atom_parser() which will parse an 'align' atom and store the required alignment position and width in the 'used_atom' structure for further usage in populate_value(). Since this patch removes the last usage of match_atom_name(), remove the function from ref-filter.c. Helped-by:

[PATCH v5 04/12] ref-filter: introduce struct used_atom

2016-02-16 Thread Karthik Nayak
Introduce the 'used_atom' structure to replace the existing implementation of 'used_atom' (which is a list of atoms). This helps us parse atoms beforehand and store required details into the 'used_atom' for future usage. Helped-by: Eric Sunshine Signed-off-by: Karthik

[PATCH v5 03/12] ref-filter: bump 'used_atom' and related code to the top

2016-02-16 Thread Karthik Nayak
Bump code to the top for usage in further patches. Signed-off-by: Karthik Nayak --- ref-filter.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ref-filter.c b/ref-filter.c index 38f38d4..c3a8372 100644 ---

[PATCH v5 09/12] ref-filter: align: introduce long-form syntax

2016-02-16 Thread Karthik Nayak
Introduce optional prefixes "width=" and "position=" for the align atom so that the atom can be used as "%(align:width=,position=)". Add Documentation and tests for the same. Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak ---

[PATCH v5 01/12] strbuf: introduce strbuf_split_str_omit_term()

2016-02-16 Thread Karthik Nayak
The current implementation of 'strbuf_split_buf()' includes the terminator at the end of each strbuf post splitting. Add an option wherein we can drop the terminator if desired. In this context introduce a wrapper function 'strbuf_split_str_omit_term()' which splits a given string into strbufs

[PATCH v5 06/12] ref-filter: introduce color_atom_parser()

2016-02-16 Thread Karthik Nayak
Introduce color_atom_parser() which will parse a "color" atom and store its color in the "used_atom" structure for further usage in populate_value(). Helped-by: Ramsay Jones Helped-by: Eric Sunshine Signed-off-by: Karthik Nayak

[PATCH v5 00/12] ref-filter: use parsing functions

2016-02-16 Thread Karthik Nayak
This series cleans up populate_value() in ref-filter, by moving out the parsing part of atoms to separate parsing functions. This ensures that parsing is only done once and also improves the modularity of the code. v1: http://thread.gmane.org/gmane.comp.version-control.git/281180 v2:

Re: RFC: Resumable clone based on hybrid "smart" and "dumb" HTTP

2016-02-16 Thread Stefan Beller
On Sun, Feb 14, 2016 at 9:05 AM, Jeff King wrote: > > I'm also not happy about having an HTTP-only feature in the protocol. I > liked Stefan's proposal for the "v2" protocol that would let the two > sides exchange capabilities before the ref advertisement. Then the > client, having

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

2016-02-16 Thread Stefan Beller
On Sat, Feb 13, 2016 at 3:21 AM, Matthieu Moy wrote: > Jeff King writes: > >> On Fri, Feb 12, 2016 at 08:10:34AM +0100, Matthieu Moy wrote: >> >>> So, that makes it 4 possible co-mentors, i.e. 2 potential slots. Not >>> much, but it starts looking

Re: [PATCH v4 3/3] config: add '--show-origin' option to print the origin of a config value

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 04:46:07PM +, Ramsay Jones wrote: > > OK, I am happy to add the extra code. > > Unless I've missed something (quite possible), this patch does not > need to change. (you have (both) convinced me that your current > solution is the best). > > The only change that I

Re: [PATCH v5 00/15] config: make git_config_set die on failure

2016-02-16 Thread Eric Sunshine
On Tue, Feb 16, 2016 at 7:56 AM, Patrick Steinhardt wrote: > [...] > Junio pointed out that it might not always be the most sensible > thing to die when install_branch_config fails. After thinking > about it I changed the behavior of the function to print an error > and advise

Re: [PATCH v4 3/3] config: add '--show-origin' option to print the origin of a config value

2016-02-16 Thread Ramsay Jones
On 16/02/16 09:51, Lars Schneider wrote: > > On 15 Feb 2016, at 23:39, Ramsay Jones wrote: > >> >> >> On 15/02/16 21:40, Jeff King wrote: >>> On Mon, Feb 15, 2016 at 09:36:23PM +, Ramsay Jones wrote: >>> > +test_expect_success '--show-origin stdin' ' >

Re: [PULL] svn pathnameencoding for git svn dcommit

2016-02-16 Thread Kazutoshi Satoda
On 2016/02/16 15:33 +0900, Eric Wong wrote: > Kazutoshi Satoda wrote: >> Thank you for the tests. But, on my environment, both of them failed >> unexpectedly. (Windows 7 SP1, x86_64 Cygwin, LANG=ja_JP.UTF-8) ... >> > Untracked files: >> > svnrepo/ >> >

Re: [PATCH v3 0/4] git remote improvements

2016-02-16 Thread Jeff King
On Tue, Feb 16, 2016 at 10:47:48AM +0100, Thomas Gummerer wrote: > Previous rounds are at $gmane/286214 and $gmane/286278. Thanks to > Peff and Eric for the reviews on the previous round. This round looks good to me. Thanks for working on it! Reviewed-by: Jeff King -Peff -- To

[PATCH 02/20] safe_create_leading_directories(): set errno on SCLD_EXISTS

2016-02-16 Thread Michael Haggerty
The exit path for SCLD_EXISTS wasn't setting errno, as expected by at least one caller. Fix the problem and document that the function sets errno correctly to help avoid similar regressions in the future. While we're at it, document the difference between safe_create_leading_directories() and

[PATCH 04/20] lock_ref_sha1_basic(): use raceproof_create_file()

2016-02-16 Thread Michael Haggerty
Instead of coding the retry loop inline, use raceproof_create_file() to make lock acquisition safe against directory creation/deletion races. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 47 +++ 1 file changed, 19

[PATCH 08/20] log_ref_setup(): improve robustness against races

2016-02-16 Thread Michael Haggerty
Change log_ref_setup() to use raceproof_create_file() to create the new logfile. This makes it more robust against a race against another process that might be trying to clean up empty directories while we are trying to create a new logfile. This also means that it will only call

[PATCH v2 12/26] worktree.c: use is_dot_or_dotdot()

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/worktree.c | 2 +- worktree.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/builtin/worktree.c b/builtin/worktree.c index 68341e4..cfc848d 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c

[PATCH v2 08/26] completion: support git-worktree

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- contrib/completion/git-completion.bash | 23 +++ 1 file changed, 23 insertions(+) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 45ec47f..099d52e 100644 ---

[PATCH 15/20] try_remove_empty_parents(): don't accommodate consecutive slashes

2016-02-16 Thread Michael Haggerty
"refname" has already been checked by check_refname_format(), so it cannot have consecutive slashes. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/refs/files-backend.c

[PATCH v2 21/26] worktree: simplify prefixing paths

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/worktree.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/builtin/worktree.c b/builtin/worktree.c index 97666cc..b261e11 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -332,7 +332,7 @@ static

[PATCH 11/20] log_ref_setup(): manage the name of the reflog file internally

2016-02-16 Thread Michael Haggerty
Instead of writing the name of the reflog file into a strbuf that is supplied by the caller but not needed there, write it into a local temporary buffer and remove the strbuf parameter entirely. And while we're adjusting the function signature, reorder the arguments to move the input parameters

[PATCH v2 13/26] worktree.c: store "id" instead of "git_dir"

2016-02-16 Thread Nguyễn Thái Ngọc Duy
We can reconstruct git_dir from id quite easily. It's a bit hackier to do the reverse. Signed-off-by: Nguyễn Thái Ngọc Duy --- worktree.c | 29 - worktree.h | 7 ++- 2 files changed, 22 insertions(+), 14 deletions(-) diff --git a/worktree.c

[PATCH v2 22/26] worktree: add "lock" command

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-worktree.txt | 12 -- builtin/worktree.c | 41 ++ contrib/completion/git-completion.bash | 5 - t/t2028-worktree-move.sh (new +x) | 34

[PATCH v2 23/26] worktree: add "unlock" command

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-worktree.txt | 5 + builtin/worktree.c | 31 +++ contrib/completion/git-completion.bash | 2 +- t/t2028-worktree-move.sh | 14 ++ 4

[PATCH 05/20] rename_tmp_log(): use raceproof_create_file()

2016-02-16 Thread Michael Haggerty
Besides shortening the code, this saves an unnecessary call to safe_create_leading_directories_const() in almost all cases. Signed-off-by: Michael Haggerty --- refs/files-backend.c | 76 ++-- 1 file changed, 32 insertions(+),

[PATCH v2 24/26] worktree: add "move" commmand

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-worktree.txt | 6 +++- builtin/worktree.c | 60 ++ contrib/completion/git-completion.bash | 2 +- t/t2028-worktree-move.sh | 29

[PATCH v2 25/26] worktree move: accept destination as directory

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Similar to "mv a b/", which is actually "mv a b/a", we extract basename of source worktree and create a directory of the same name at destination if dst path is a directory. Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/worktree.c | 19 ++- 1 file changed,

[PATCH v2 14/26] worktree.c: add clear_worktree()

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- worktree.c | 14 +++--- worktree.h | 5 + 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/worktree.c b/worktree.c index 4c38414..b4e4b57 100644 --- a/worktree.c +++ b/worktree.c @@ -4,14 +4,22 @@ #include

[PATCH v2 26/26] worktree: add "remove" command

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- Documentation/git-worktree.txt | 22 + builtin/worktree.c | 81 ++ contrib/completion/git-completion.bash | 5 ++- t/t2028-worktree-move.sh | 26

[PATCH v2 18/26] worktree.c: add update_worktree_location()

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- worktree.c | 25 + worktree.h | 6 ++ 2 files changed, 31 insertions(+) diff --git a/worktree.c b/worktree.c index 28195b1..04aac73 100644 --- a/worktree.c +++ b/worktree.c @@ -282,6 +282,31 @@ int

[PATCH v2 19/26] worktree.c: add is_worktree_locked()

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- worktree.c | 18 ++ worktree.h | 6 ++ 2 files changed, 24 insertions(+) diff --git a/worktree.c b/worktree.c index 04aac73..facb907 100644 --- a/worktree.c +++ b/worktree.c @@ -219,6 +219,24 @@ int

[PATCH v2 16/26] worktree.c: add is_main_worktree()

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- worktree.c | 5 + worktree.h | 5 + 2 files changed, 10 insertions(+) diff --git a/worktree.c b/worktree.c index e444ad1..e878f49 100644 --- a/worktree.c +++ b/worktree.c @@ -214,6 +214,11 @@ struct worktree

[PATCH v2 20/26] worktree: avoid 0{40}, too many zeroes, hard to read

2016-02-16 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy --- builtin/worktree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/worktree.c b/builtin/worktree.c index cfc848d..97666cc 100644 --- a/builtin/worktree.c +++ b/builtin/worktree.c @@ -263,7 +263,7 @@ static int

[PATCH 16/20] t5505: use "for-each-ref" to test for the non-existence of references

2016-02-16 Thread Michael Haggerty
Instead of looking on the filesystem inside ".git/refs/remotes/origin", use "git for-each-ref" to check for leftover references under the remote's old name. Signed-off-by: Michael Haggerty --- t/t5505-remote.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

  1   2   >