Re: [PATCH v2 2/5] pretty: allow showing specific trailers

2018-11-05 Thread Anders Waldenborg
Eric Sunshine writes: > Should the code tolerate a trailing colon? (Genuine question; it's > easy to do and would be more user-friendly.) I would make sense to allow the trailing colon, it is easy enough to just strip that away when reading the argument. However I'm not sure how that would fit

Re: [PATCH v5 01/12] sha1-file: rename algorithm to "sha1"

2018-11-04 Thread Ævar Arnfjörð Bjarmason
On Sun, Nov 04 2018, brian m. carlson wrote: > The transition plan anticipates us using a syntax such as "^{sha1}" for > disambiguation. Since this is a syntax some people will be typing a > lot, it makes sense to provide a short, easy-to-type syntax. Omitting > the dash doesn't create any

Re: [PATCH v2 0/5] %(trailers) improvements in pretty format

2018-11-04 Thread Anders Waldenborg
Eric Sunshine writes: > If "key" is for including particular trailers, intuition might lead > people to think that "nokey" is for excluding certain trailers. > Perhaps a different name for "nokey", such as "valueonly" or > "stripkey", would be better. Good point. I guess "valueonly" would be

Re: [PATCH 01/13] apply: mark include/exclude options as NONEG

2018-11-04 Thread Junio C Hamano
Jeff King writes: > The options callback for "git apply --no-include" is not ready to handle > the "unset" parameter, and as a result will segfault when it adds a NULL > argument to the include list (likewise for "--no-exclude"). > > In theory this might be used to clear the list, but since both

Re: [PATCH 02/13] am: handle --no-patch-format option

2018-11-04 Thread Junio C Hamano
Jeff King writes: > Running "git am --no-patch-format" will currently segfault, since it > tries to parse a NULL argument. Instead, let's have it cancel any > previous --patch-format option. Makes perfect sense. > > Signed-off-by: Jeff King > --- > builtin/am.c | 4 +++- > 1 file changed, 3

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-04 Thread Johannes Sixt
Am 05.11.18 um 00:26 schrieb Junio C Hamano: OK, thanks. It seems that the relative silence after this message is a sign that the resulting patch after squashing is what everybody is happey with? I'm not 100% happy. I'll resend a squashed patch, but it has to wait as I have to catch a train

Re: [PATCH] diff: differentiate error handling in parse_color_moved_ws

2018-11-04 Thread Junio C Hamano
Junio C Hamano writes: > Stefan Beller writes: > >> >> -static int parse_color_moved_ws(const char *arg) >> +static unsigned parse_color_moved_ws(const char *arg) >> { >> int ret = 0; >> struct string_list l = STRING_LIST_INIT_DUP; >> @@ -312,15 +312,19 @@ static int

Re: [PATCH v2 5/5] pretty: add support for separator option in %(trailers)

2018-11-04 Thread Junio C Hamano
Anders Waldenborg writes: > + if (opts->separator && first_printed) > + strbuf_addbuf(out, opts->separator); > if (opts->no_key) > - strbuf_addf(out, "%s\n",

Re: [PATCH v2 2/5] pretty: allow showing specific trailers

2018-11-04 Thread Junio C Hamano
Anders Waldenborg writes: > + else if (skip_prefix(arg, "key=", )) { > + const char *end = arg + strcspn(arg, > ",)"); > + > + if (opts.filter_key) > +

Re: [PATCH 2/2] t/t7510-signed-commit.sh: add signing subkey to Eris Discordia key

2018-11-04 Thread Michał Górny
On Mon, 2018-11-05 at 10:08 +0900, Junio C Hamano wrote: > Michał Górny writes: > > > > It's my understanding that GnuPG will use the most recent subkey > > > suitable for a particular purpose, and I think the test relies on that > > > behavior. However, I'm not sure that's documented. Do we

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-04 Thread Junio C Hamano
Eric Sunshine writes: > On Sun, Nov 4, 2018 at 6:26 PM Junio C Hamano wrote: >> OK, thanks. It seems that the relative silence after this message >> is a sign that the resulting patch after squashing is what everybody >> is happey with? >> >> -- >8 -- >> From: Steve Hoelzer >> >>

Re: [PATCH v2 2/5] pretty: allow showing specific trailers

2018-11-04 Thread Eric Sunshine
On Sun, Nov 4, 2018 at 10:48 PM Junio C Hamano wrote: > Eric Sunshine writes: > > Does the user have to include the colon when specifying of > > 'key='? > > Does 'key=', do a full or partial match on trailers? > > What happens if 'key=...' is specified multiple times? > > Thinking further on

Re: [PATCH v2 2/5] pretty: allow showing specific trailers

2018-11-04 Thread Junio C Hamano
Eric Sunshine writes: > Does the user have to include the colon when specifying of > 'key='? I can see from peeking at the implementation that the > colon must not be used, but this should be documented. Should the code > tolerate a trailing colon? (Genuine question; it's easy to do and > would

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-04 Thread Eric Sunshine
On Sun, Nov 4, 2018 at 6:26 PM Junio C Hamano wrote: > OK, thanks. It seems that the relative silence after this message > is a sign that the resulting patch after squashing is what everybody > is happey with? > > -- >8 -- > From: Steve Hoelzer > > Signed-off-by: Johannes Sixt > Acked-by:

Re: [PATCH v5 00/12] Base SHA-256 implementation

2018-11-04 Thread Junio C Hamano
"brian m. carlson" writes: > This series provides a functional SHA-256 implementation and wires it > up, along with some housekeeping patches to make it suitable for > testing. > > Changes from v4: > * Downcase hex constants for consistency. > * Remove needless parentheses in return statement. >

Re: [PATCH v2 5/5] pretty: add support for separator option in %(trailers)

2018-11-04 Thread Junio C Hamano
Anders Waldenborg writes: > @@ -1352,6 +1353,17 @@ static size_t format_commit_one(struct strbuf *sb, /* > in UTF-8 */ > arg++; > > opts.only_trailers = 1; > + } else if

Re: [PATCH v2 4/5] pretty: extract fundamental placeholders to separate function

2018-11-04 Thread Junio C Hamano
Anders Waldenborg writes: > No functional change intended > > Signed-off-by: Anders Waldenborg > --- > pretty.c | 37 ++--- > 1 file changed, 26 insertions(+), 11 deletions(-) I do not think "fundamental" is the best name for this, but I agree that it would be

Re: [PATCH v4 2/5] am: improve author-script error reporting

2018-11-04 Thread Junio C Hamano
Eric Sunshine writes: > Junio labeled the "-2" trick "cute", and while it is optimal in that > it only traverses the key/value list once, it also increases cognitive > load since the reader has to spend a good deal more brain cycles > understanding what is going on than would be the case with

Re: [PATCH v2] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > tree_entry_interesting() is used for matching pathspec on a tree. The > interesting thing about this function is that, because the tree > entries are known to be sorted, this function can return more than > just "yes, matched" and "no, not matched". It can also

Re: [PATCH] sequencer.c: remove a stray semicolon

2018-11-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > On top of ag/rebase-i-in-c Thanks.

Re: [PATCH] git-worktree.txt: correct linkgit command name

2018-11-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > Noticed-by: SZEDER Gábor > Signed-off-by: Nguyễn Thái Ngọc Duy > --- > On top of nd/per-worktree-ref-iteration Thanks. > > Documentation/git-worktree.txt | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Documentation/git-worktree.txt

Re: [PATCH v2] build: link with curl-defined linker flags

2018-11-04 Thread Junio C Hamano
James Knight writes: > Changes v1 -> v2: > - Improved support for detecting curl linker flags when not using a > configure-based build (mentioned by Junio C Hamano). > - Adding a description on how to explicitly use the CURL_LDFLAGS > define when not using configure (suggested by Junio

Re: [PATCH 2/2] t/t7510-signed-commit.sh: add signing subkey to Eris Discordia key

2018-11-04 Thread Junio C Hamano
Michał Górny writes: >> It's my understanding that GnuPG will use the most recent subkey >> suitable for a particular purpose, and I think the test relies on that >> behavior. However, I'm not sure that's documented. Do we want to rely >> on that behavior or be more explicit? (This is a

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > A reverted commit will have a new trailer > > Revert: Please don't, unless you are keeping the current "the effect of commit X relative to its parent Y was reverted" writtein in prose, which is meant to be followed up with a manually written "because ..."

Re: [PATCH v3] commit: add a commit.allowEmpty config variable

2018-11-04 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > I.e. you seemingly have no interest in using "git commit" to produce > empty commits, but are just trying to cherry-pick something and it's > failing because it (presumably, or am I missing something) cherry picks > an existing commit content ends up not

RE: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-04 Thread Randall S. Becker
On November 4, 2018 6:26 PM, Junio C Hamano, wrote: > Johannes Sixt writes: > > > Am 03.11.18 um 09:14 schrieb Carlo Arenas: > >> On Fri, Nov 2, 2018 at 9:44 AM Johannes Sixt wrote: > >>> > >>> + timeout = elapsed >= orig_timeout ? 0 : (int)(orig_timeout - > >>> + elapsed); > >> > >>

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-04 Thread Junio C Hamano
Johannes Sixt writes: > Am 03.11.18 um 09:14 schrieb Carlo Arenas: >> On Fri, Nov 2, 2018 at 9:44 AM Johannes Sixt wrote: >>> >>> + timeout = elapsed >= orig_timeout ? 0 : (int)(orig_timeout - >>> elapsed); >> >> nitpick: cast to DWORD instead of int > > No; timeout is of type int; after

Re: [PATCH/RFC v2] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread brian m. carlson
On Sun, Nov 04, 2018 at 07:10:26PM +0100, Nguyễn Thái Ngọc Duy wrote: > When a commit is reverted (or cherry-picked with -x) we add an English > sentence recording that commit id in the new commit message. Make > these real trailer lines instead so that they are more friendly to > parsers

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread Phillip Wood
Hi Duy On 04/11/2018 17:41, Duy Nguyen wrote: On Sun, Nov 4, 2018 at 5:45 PM Phillip Wood wrote: On 04/11/2018 07:22, Nguyễn Thái Ngọc Duy wrote: When a commit is reverted (or cherry-picked with -x) we add an English sentence recording that commit id in the new commit message. Make these

Re: [PATCH v2 2/5] pretty: allow showing specific trailers

2018-11-04 Thread Eric Sunshine
On Sun, Nov 4, 2018 at 10:24 AM Anders Waldenborg wrote: > Adds a new "key=X" option to "%(trailers)" which will cause it to only > print trailers lines which matches the specified key. > > Signed-off-by: Anders Waldenborg > --- > diff --git a/Documentation/pretty-formats.txt >

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread Duy Nguyen
On Sun, Nov 4, 2018 at 5:45 PM Phillip Wood wrote: > > On 04/11/2018 07:22, Nguyễn Thái Ngọc Duy wrote: > > When a commit is reverted (or cherry-picked with -x) we add an English > > sentence recording that commit id in the new commit message. Make > > these real trailer lines instead so that

Re: [PATCH v2 0/5] %(trailers) improvements in pretty format

2018-11-04 Thread Eric Sunshine
On Sun, Nov 4, 2018 at 10:23 AM Anders Waldenborg wrote: > This adds support for three new options to %(trailers): > * key -- show only trailers with specified key > * nokey -- don't show key part of trailers > * separator -- allow specifying custom separator between trailers If "key" is for

Re: [PATCH/RFC] sequencer.c: record revert/cherry-pick commit with trailer lines

2018-11-04 Thread Phillip Wood
On 04/11/2018 07:22, Nguyễn Thái Ngọc Duy wrote: When a commit is reverted (or cherry-picked with -x) we add an English sentence recording that commit id in the new commit message. Make these real trailer lines instead so that they are more friendly to parsers (especially "git

Re: [PATCH 2/2] t/t7510-signed-commit.sh: add signing subkey to Eris Discordia key

2018-11-04 Thread Michał Górny
On Sun, 2018-11-04 at 15:10 +, brian m. carlson wrote: > On Sun, Nov 04, 2018 at 10:47:10AM +0100, Michał Górny wrote: > > diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh > > index e8377286d..86d3f93fa 100755 > > --- a/t/t7510-signed-commit.sh > > +++

Re: [PATCH 2/2] t/t7510-signed-commit.sh: add signing subkey to Eris Discordia key

2018-11-04 Thread brian m. carlson
On Sun, Nov 04, 2018 at 10:47:10AM +0100, Michał Górny wrote: > diff --git a/t/t7510-signed-commit.sh b/t/t7510-signed-commit.sh > index e8377286d..86d3f93fa 100755 > --- a/t/t7510-signed-commit.sh > +++ b/t/t7510-signed-commit.sh > @@ -197,9 +197,9 @@ test_expect_success GPG 'show bad signature

Re: [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-04 Thread Duy Nguyen
On Sun, Nov 4, 2018 at 7:27 AM Eric Sunshine wrote: > > On Sat, Nov 3, 2018 at 8:25 PM Eric Sunshine wrote: > > On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy > > wrote: > > > +test_expect_success 't_e_i() exclude case #8' ' > > > + git init case8 && > > > + ( > > > +

Re: [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-04 Thread Eric Sunshine
On Sat, Nov 3, 2018 at 8:25 PM Eric Sunshine wrote: > On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy > wrote: > > +test_expect_success 't_e_i() exclude case #8' ' > > + git init case8 && > > + ( > > + cd case8 && > > + echo file >file1 && > > +

Re: [PATCH v4 2/5] am: improve author-script error reporting

2018-11-03 Thread Eric Sunshine
On Wed, Oct 31, 2018 at 6:16 AM Phillip Wood wrote: > diff --git a/builtin/am.c b/builtin/am.c > @@ -308,6 +312,7 @@ static int read_author_script(struct am_state *state) > + int i, name_i = -2, email_i = -2, date_i = -2, err = 0; > @@ -326,14 +331,38 @@ static int read_author_script(struct

Re: [PATCH] multi-pack-index: make code -Wunused-parameter clean

2018-11-03 Thread Jeff King
On Sat, Nov 03, 2018 at 05:49:57PM -0700, Carlo Marcelo Arenas Belón wrote: > introduced in 662148c435 ("midx: write object offsets", 2018-07-12) > but included on all previous versions as well. > > midx.c:713:54: warning: unused parameter 'nr_objects' [-Wunused-parameter] > > likely an

Re: [PATCH] tree-walk.c: fix overoptimistic inclusion in :(exclude) matching

2018-11-03 Thread Eric Sunshine
On Sat, Nov 3, 2018 at 11:31 AM Nguyễn Thái Ngọc Duy wrote: > Rules 8 and 18 are now updated to be less eager. We conclude that the > current entry is positively matched and included. But we say nothing > about remaining entries. tree_entry_interesting() will be called again > for those entries

Re: [PATCH v3] commit: add a commit.allowEmpty config variable

2018-11-03 Thread Ævar Arnfjörð Bjarmason
On Sat, Nov 03 2018, tanushree27 wrote: > +commit.allowEmpty:: > + A boolean to specify whether empty commits are allowed with `git > + commit`. See linkgit:git-commit[1]. > + Defaults to false. > + Good. > + if (config_commit_allow_empty >= 0) /* if allowEmpty is allowed in

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Michał Górny
On Sat, 2018-11-03 at 16:36 +0100, Duy Nguyen wrote: > On Sat, Nov 3, 2018 at 4:32 PM Michał Górny wrote: > > > Perhaps my gpg is too old? > > > > > > $ gpg --version > > > gpg (GnuPG) 2.1.15 > > > libgcrypt 1.7.3 > > > Copyright (C) 2016 Free Software Foundation, Inc. > > > License GPLv3+: GNU

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 4:32 PM Michał Górny wrote: > Perhaps this is indeed specific to this version of GnuPG. The tests > pass for me with both 1.4.21 and 2.2.10. We don't have 2.1* in Gentoo > anymore. Updated to 2.2.8 and the test is passed. -- Duy

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 4:32 PM Michał Górny wrote: > > Perhaps my gpg is too old? > > > > $ gpg --version > > gpg (GnuPG) 2.1.15 > > libgcrypt 1.7.3 > > Copyright (C) 2016 Free Software Foundation, Inc. > > License GPLv3+: GNU GPL version 3 or later > > > >

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Michał Górny
On Sat, 2018-11-03 at 16:17 +0100, Duy Nguyen wrote: > On Sat, Oct 20, 2018 at 9:31 PM Michał Górny wrote: > > +test_expect_success GPG 'detect fudged commit with double signature' ' > > + sed -e "/gpgsig/,/END PGP/d" forged1 >double-base && > > + sed -n -e "/gpgsig/,/END PGP/p"

Re: [PATCH v4] gpg-interface.c: detect and reject multiple signatures on commits

2018-11-03 Thread Duy Nguyen
On Sat, Oct 20, 2018 at 9:31 PM Michał Górny wrote: > +test_expect_success GPG 'detect fudged commit with double signature' ' > + sed -e "/gpgsig/,/END PGP/d" forged1 >double-base && > + sed -n -e "/gpgsig/,/END PGP/p" forged1 | \ > + sed -e "s/^gpgsig//;s/^ //" | gpg

Re: [[PATCH v2]] commit: add a commit.allowempty config variable

2018-11-03 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 12:55 PM tanushree27 wrote: > > Add commit.allowempty configuration variable as a convenience for those > who always prefer --allow-empty. > > Add tests to check the behavior introduced by this commit. > > This closes https://github.com/git-for-windows/git/issues/1854 > >

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-03 Thread Johannes Sixt
Am 03.11.18 um 09:14 schrieb Carlo Arenas: On Fri, Nov 2, 2018 at 9:44 AM Johannes Sixt wrote: + timeout = elapsed >= orig_timeout ? 0 : (int)(orig_timeout - elapsed); nitpick: cast to DWORD instead of int No; timeout is of type int; after an explicit type cast we don't want to have

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-03 Thread Junio C Hamano
Duy Nguyen writes: >> Would it make sense to make send-email's completion helper print these >> out directly? That way, if someone were to modify send-email in the >> future, they'd only have to look through one file instead of both >> send-email and the completions script. > > I did think about

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-03 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 8:59 AM Denton Liu wrote: > > @@ -2081,7 +2077,7 @@ _git_send_email () > > return > > ;; > > --*) > > - __gitcomp "--annotate --bcc --cc --cc-cmd --chain-reply-to > > + __gitcomp_builtin send-email "--annotate --bcc

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-03 Thread Carlo Arenas
On Fri, Nov 2, 2018 at 9:44 AM Johannes Sixt wrote: > > + timeout = elapsed >= orig_timeout ? 0 : (int)(orig_timeout - elapsed); nitpick: cast to DWORD instead of int Carlo

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-03 Thread Denton Liu
On Sat, Nov 03, 2018 at 07:03:18AM +0100, Duy Nguyen wrote: > Subject: [PATCH] completion: use __gitcomp_builtin for format-patch > > This helps format-patch gain completion for a couple new options, > notably --range-diff. > > Since send-email completion relies on $__git_format_patch_options >

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-03 Thread Duy Nguyen
On Fri, Nov 02, 2018 at 08:52:30AM +0900, Junio C Hamano wrote: > Duy Nguyen writes: > > >> > I have no comment about this. In an ideal world, sendemail.perl could > >> > be taught to support --git-completion-helper but I don't think my > >> > little remaining Perl knowledge (or time) is enough

Re: [PATCH v1] add: speed up cmd_add() by utilizing read_cache_preload()

2018-11-02 Thread Duy Nguyen
On Sat, Nov 3, 2018 at 1:38 AM Junio C Hamano wrote: > > Duy Nguyen writes: > > > On Fri, Nov 2, 2018 at 2:32 PM Ben Peart wrote: > >> > >> From: Ben Peart > >> > >> During an "add", a call is made to run_diff_files() which calls > >> check_remove() for each index-entry. The preload_index()

Re: [PATCH] diff: differentiate error handling in parse_color_moved_ws

2018-11-02 Thread Junio C Hamano
Stefan Beller writes: > > -static int parse_color_moved_ws(const char *arg) > +static unsigned parse_color_moved_ws(const char *arg) > { > int ret = 0; > struct string_list l = STRING_LIST_INIT_DUP; > @@ -312,15 +312,19 @@ static int parse_color_moved_ws(const char *arg) >

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-02 Thread Junio C Hamano
Junio C Hamano writes: > Johannes Sixt writes: > >>> Yep, correct on all counts. I'm in favor of changing the commit message to >>> only say that this patch removes Warning C28159. >> >> How about this fixup instead? > > Isn't that already in 'next'? I didn't check, though. Well, it turnsout

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-02 Thread Junio C Hamano
Johannes Sixt writes: >> Yep, correct on all counts. I'm in favor of changing the commit message to >> only say that this patch removes Warning C28159. > > How about this fixup instead? Isn't that already in 'next'? I didn't check, though.

Re: [PATCH v1] add: speed up cmd_add() by utilizing read_cache_preload()

2018-11-02 Thread Junio C Hamano
Duy Nguyen writes: > On Fri, Nov 2, 2018 at 2:32 PM Ben Peart wrote: >> >> From: Ben Peart >> >> During an "add", a call is made to run_diff_files() which calls >> check_remove() for each index-entry. The preload_index() code distributes >> some of the costs across multiple threads. > >

Re: [PATCH 3/9] diff: avoid generating unused hunk header lines

2018-11-02 Thread Junio C Hamano
Jeff King writes: >> to have *some* names there, for the sake of a >> simply described coding style without many exceptions >> (especially those exceptions that rely on judgement). > > Fair enough. For the record, there aren't "many" exceptions to the rule that was suggested earlier: if you

Re: [PATCH 3/9] diff: avoid generating unused hunk header lines

2018-11-02 Thread Jeff King
On Fri, Nov 02, 2018 at 12:50:05PM -0700, Stefan Beller wrote: > > +/* > > + * Can be used as a no-op hunk_fn for xdi_diff_outf(), since a NULL > > + * one just sends the hunk line to the line_fn callback). > > + */ > > +void discard_hunk_line(void *, long, long, long, long, const char *, long);

Re: [PATCH v4 00/10] Improve path collision conflict resolutions

2018-11-02 Thread Elijah Newren
On Fri, Nov 2, 2018 at 12:09 PM Derrick Stolee wrote: > > On 11/2/2018 2:53 PM, Elijah Newren wrote: > > Major question: > >* You'll note that I edited the last two patches to mark them as RFC. > > To be honest, I'm not sure what to do with these. They improve code > > coverage of

Re: [PATCH 3/9] diff: avoid generating unused hunk header lines

2018-11-02 Thread Stefan Beller
> +/* > + * Can be used as a no-op hunk_fn for xdi_diff_outf(), since a NULL > + * one just sends the hunk line to the line_fn callback). > + */ > +void discard_hunk_line(void *, long, long, long, long, const char *, long); Recently we had the discussion on style and naming things. On the one

Re: [PATCH v4 00/10] Improve path collision conflict resolutions

2018-11-02 Thread Derrick Stolee
On 11/2/2018 2:53 PM, Elijah Newren wrote: Major question: * You'll note that I edited the last two patches to mark them as RFC. To be honest, I'm not sure what to do with these. They improve code coverage of new code, but the same gaps existed in the old code; they only show

Re: [PATCH v3 8/8] merge-recursive: improve rename/rename(1to2)/add[/add] handling

2018-11-02 Thread Derrick Stolee
On 11/2/2018 1:27 PM, Elijah Newren wrote: On Thu, Nov 1, 2018 at 12:01 AM Elijah Newren wrote: On Wed, Oct 31, 2018 at 8:08 AM Derrick Stolee wrote: On 10/19/2018 3:31 PM, Elijah Newren wrote: [snip] + char *new_path = NULL; + if

Re: [PATCH v3 8/8] merge-recursive: improve rename/rename(1to2)/add[/add] handling

2018-11-02 Thread Elijah Newren
On Thu, Nov 1, 2018 at 12:01 AM Elijah Newren wrote: > > On Wed, Oct 31, 2018 at 8:08 AM Derrick Stolee wrote: > > > > On 10/19/2018 3:31 PM, Elijah Newren wrote: > > > [snip] > > > > > > + char *new_path = NULL; > > > + if (dir_in_way(b->path,

Re: [PATCH 19/24] submodule: use submodule repos for object lookup

2018-11-02 Thread Derrick Stolee
On 11/2/2018 1:23 PM, Stefan Beller wrote: On Fri, Nov 2, 2018 at 6:03 AM Derrick Stolee wrote: On 10/30/2018 6:08 PM, Stefan Beller wrote: This converts the 'show_submodule_header' function to use the repository API properly, such that the submodule objects are not added to the main object

Re: [PATCH 19/24] submodule: use submodule repos for object lookup

2018-11-02 Thread Stefan Beller
On Fri, Nov 2, 2018 at 6:03 AM Derrick Stolee wrote: > > On 10/30/2018 6:08 PM, Stefan Beller wrote: > > This converts the 'show_submodule_header' function to use > > the repository API properly, such that the submodule objects > > are not added to the main object store. > > > > Signed-off-by:

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-02 Thread Steve Hoelzer
On Fri, Nov 2, 2018 at 11:43 AM Johannes Sixt wrote: > > Am 02.11.18 um 15:47 schrieb Steve Hoelzer: > > On Thu, Nov 1, 2018 at 5:22 AM Johannes Sixt wrote: > >> > >> Am 31.10.18 um 22:11 schrieb Steve Hoelzer via GitGitGadget: > >>> @@ -614,7 +618,7 @@ restart: > >>> > >>> if (!rc &&

Re: [PATCH v2 06/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-11-02 Thread Phillip Wood
Hi Alban On 02/11/2018 16:26, Alban Gruin wrote: Hi Phillip, Le 02/11/2018 à 11:09, Phillip Wood a écrit : +    struct todo_item *items = NULL, +    base_item = {TODO_EXEC, NULL, 0, 0, commands_len, 0}; + +    strbuf_addstr(buf, commands); +    base_item.offset_in_buf = buf->len -

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-02 Thread Johannes Sixt
Am 02.11.18 um 15:47 schrieb Steve Hoelzer: > On Thu, Nov 1, 2018 at 5:22 AM Johannes Sixt wrote: >> >> Am 31.10.18 um 22:11 schrieb Steve Hoelzer via GitGitGadget: >>> @@ -614,7 +618,7 @@ restart: >>> >>> if (!rc && orig_timeout && timeout != INFTIM) >>>{ >>> - elapsed =

Re: [PATCH v3] i18n: make GETTEXT_POISON a runtime option

2018-11-02 Thread SZEDER Gábor
On Thu, Nov 01, 2018 at 07:31:15PM +, Ævar Arnfjörð Bjarmason wrote: > Change the GETTEXT_POISON compile-time + runtime GIT_GETTEXT_POISON > test parameter to only be a GIT_TEST_GETTEXT_POISON= > runtime parameter, to be consistent with other parameters documented > in "Running tests with

Re: [PATCH v2 06/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-11-02 Thread Alban Gruin
Hi Phillip, Le 02/11/2018 à 11:09, Phillip Wood a écrit : +    struct todo_item *items = NULL, +    base_item = {TODO_EXEC, NULL, 0, 0, commands_len, 0}; + +    strbuf_addstr(buf, commands); +    base_item.offset_in_buf = buf->len - commands_len - 1; +   

Re: [PATCH v1] add: speed up cmd_add() by utilizing read_cache_preload()

2018-11-02 Thread Ben Peart
On 11/2/2018 11:23 AM, Junio C Hamano wrote: Ben Peart writes: From: Ben Peart During an "add", a call is made to run_diff_files() which calls check_remove() for each index-entry. The preload_index() code distributes some of the costs across multiple threads. Nice. I peeked around

Re: [PATCH v1] add: speed up cmd_add() by utilizing read_cache_preload()

2018-11-02 Thread Duy Nguyen
On Fri, Nov 2, 2018 at 2:32 PM Ben Peart wrote: > > From: Ben Peart > > During an "add", a call is made to run_diff_files() which calls > check_remove() for each index-entry. The preload_index() code distributes > some of the costs across multiple threads. Instead of doing this site by site.

Re: [PATCH 0/3] Make add_missing_tags() linear

2018-11-02 Thread Derrick Stolee
On 11/2/2018 10:58 AM, Elijah Newren wrote: On Thu, Nov 1, 2018 at 12:02 PM Derrick Stolee wrote: On 11/1/2018 2:57 PM, Elijah Newren wrote: On Thu, Nov 1, 2018 at 5:32 AM Derrick Stolee wrote: No rush. I'd just like to understand how removing the commit-graph file can make the new

Re: [PATCH v1] add: speed up cmd_add() by utilizing read_cache_preload()

2018-11-02 Thread Junio C Hamano
Ben Peart writes: > From: Ben Peart > > During an "add", a call is made to run_diff_files() which calls > check_remove() for each index-entry. The preload_index() code > distributes some of the costs across multiple threads. Nice. I peeked around and noticed that we already do this in

Re: [PATCH] build: link with curl-defined linker flags

2018-11-02 Thread Junio C Hamano
James Knight writes: > Makefile | 21 +++-- > config.mak.uname | 5 ++--- > configure.ac | 17 +++-- > 3 files changed, 16 insertions(+), 27 deletions(-) > > diff --git a/Makefile b/Makefile > index b08d5ea25..c3be87b0e 100644 > --- a/Makefile > +++

Re: [PATCH 0/3] Make add_missing_tags() linear

2018-11-02 Thread Elijah Newren
On Thu, Nov 1, 2018 at 12:02 PM Derrick Stolee wrote: > > On 11/1/2018 2:57 PM, Elijah Newren wrote: > > On Thu, Nov 1, 2018 at 5:32 AM Derrick Stolee wrote: > >> No rush. I'd just like to understand how removing the commit-graph file > >> can make the new algorithm faster. Putting a similar

Re: [PATCH 1/1] poll: use GetTickCount64() to avoid wrap-around issues

2018-11-02 Thread Steve Hoelzer
On Thu, Nov 1, 2018 at 5:22 AM Johannes Sixt wrote: > > Am 31.10.18 um 22:11 schrieb Steve Hoelzer via GitGitGadget: > > From: Steve Hoelzer > > > > From Visual Studio 2015 Code Analysis: Warning C28159 Consider using > > 'GetTickCount64' instead of 'GetTickCount'. > > > > Reason:

Re: [PATCH 19/24] submodule: use submodule repos for object lookup

2018-11-02 Thread Derrick Stolee
On 10/30/2018 6:08 PM, Stefan Beller wrote: This converts the 'show_submodule_header' function to use the repository API properly, such that the submodule objects are not added to the main object store. Signed-off-by: Stefan Beller A couple tests are broken in 'pu' when run with

Re: [PATCH] it's called read_object_file() these days

2018-11-02 Thread Junio C Hamano
Jeff King writes: > There's another mention in Documentation/technical/api-object-access.txt. Yes, and we are on the same page on that one. > > But since the entire API is undocumented, I'm not sure it matters much. > That file has been a placeholder since 2007. Maybe we should just delete >

Re: [PATCH 0/9] saner xdiff hunk callbacks

2018-11-02 Thread Junio C Hamano
Jeff King writes: > ... it seems rather silly that we have xdiff generate a string > just so that we can parse it from within the same process. So instead I > improved the xdiff interface to pass the actual integers out, made use > of it as appropriate, and then in the final patch we can just

Re: [PATCH v2 06/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-11-02 Thread Phillip Wood
Hi Alban On 01/11/2018 23:31, Alban Gruin wrote: > Le 30/10/2018 à 17:47, Phillip Wood a écrit : >> On 27/10/2018 22:29, Alban Gruin wrote: >>> This refactors sequencer_add_exec_commands() to work on a todo_list to >>> avoid redundant reads and writes to the disk. >>> >>> An obvious way to do

Re: [PATCH v3 0/8] fixes for unqualified push

2018-11-02 Thread Jeff King
On Fri, Oct 26, 2018 at 11:07:33PM +, Ævar Arnfjörð Bjarmason wrote: > After sending out v2 I noticed I didn't update the examples in a > couple of the commit messages, and figured I'd finish this up by > adding a patch to document how this works in the "git-push" > manpage. This behavior has

Re: [PATCH v3 5/8] push: add an advice on unqualified push

2018-11-02 Thread Jeff King
On Mon, Oct 29, 2018 at 02:14:02PM +0900, Junio C Hamano wrote: > Any failure in the &&-chain (or the last grep) would not terminate > the for loop, so for the purpose of determining the success of this > test_expect_success, the last "blob" iteration is the only thing > that matters. > > Which

Re: [PATCH] it's called read_object_file() these days

2018-11-02 Thread Jeff King
On Fri, Nov 02, 2018 at 03:05:03PM +0900, Junio C Hamano wrote: > Remnant of the old name of the function still remains in comments. > Update them all. Yay. What's here looks obviously correct. > Signed-off-by: Junio C Hamano > --- > apply.c | 2 +- > builtin/gc.c | 2 +- >

Re: [PATCH 2/3] [Outreachy] ident: introduce set_fallback_ident() function

2018-11-01 Thread Junio C Hamano
Junio C Hamano writes: > As we currently have no idea when builtin/stash.c becomes ready for > 'next', how about doing something like this instead, in order to > help end-users without waiting in the meantime? The fix can be > picked up and ported when the C rewrite is updated, of course. I

Re: [PATCH 2/3] [Outreachy] ident: introduce set_fallback_ident() function

2018-11-01 Thread Junio C Hamano
Junio C Hamano writes: > Rather than adding this fallback trap, can't we do it more like > this? > > - At the beginning of "git stash", after parsing the command > line, we know what subcommand of "git stash" we are going to > run. > > - If it is a subcommand that could need

Re: [PATCH v3] i18n: make GETTEXT_POISON a runtime option

2018-11-01 Thread Junio C Hamano
Ævar Arnfjörð Bjarmason writes: > Change the GETTEXT_POISON compile-time + runtime GIT_GETTEXT_POISON > test parameter to only be a GIT_TEST_GETTEXT_POISON= > runtime parameter, to be consistent with other parameters documented > in "Running tests with special setups" in t/README. > ... >

Re: [PATCH 2/3] [Outreachy] ident: introduce set_fallback_ident() function

2018-11-01 Thread Junio C Hamano
Slavica Djukic writes: > Usually, when creating a commit, ident is needed to record the author > and commiter. > But, when there is commit not intended to published, e.g. when stashing > changes, valid ident is not necessary. > To allow creating commits in such scenario, let's introduce helper

Re: [PATCH] travis-ci: install packages in 'ci/install-dependencies.sh'

2018-11-01 Thread Junio C Hamano
SZEDER Gábor writes: > Ever since we started using Travis CI, we specified the list of > packages to install in '.travis.yml' via the APT addon. While running > our builds on Travis CI's container-based infrastructure we didn't > have another choice, because that environment didn't support

Re: [PATCH] send-email: Avoid empty transfer encoding header

2018-11-01 Thread brian m. carlson
On Thu, Nov 01, 2018 at 09:09:34PM -0400, Aaron Lindsay wrote: > Fix a small bug introduced by "7a36987ff (send-email: add an auto option > for transfer encoding, 2018-07-14) > > I saw the following message when setting --transfer-encoding for a file > with the same encoding: > $ git

Re: [PATCH 1/3] commit-reach: implement get_reachable_subset

2018-11-01 Thread Junio C Hamano
Derrick Stolee writes: > We could do this, but it does come with a performance hit when the following > are all true: > > 1. 'to' is not reachable from any 'from' commits. > > 2. The 'to' and 'from' commits are close in commit-date. > > 3. Generation numbers are not available, or the topology is

Re: [PATCH v4 0/7] Use generation numbers for --topo-order

2018-11-01 Thread Junio C Hamano
Derrick Stolee writes: >> Review discussions seem to have petered out. Would we merge this to >> 'next' and start cooking, perhaps for the remainder of this cycle? > > Thanks, but I've just sent a v5 responding to Jakub's feedback on v4. [1] > > I'd be happy to let it sit in next until you feel

Re: [PATCH v2] completion: use builtin completion for format-patch

2018-11-01 Thread Junio C Hamano
Duy Nguyen writes: >> > I have no comment about this. In an ideal world, sendemail.perl could >> > be taught to support --git-completion-helper but I don't think my >> > little remaining Perl knowledge (or time) is enough to do it. Perhaps >> > this will do. I don't know. >> >> So "all",

Re: [PATCH 3/3] tests: optionally skip `git rebase -p` tests

2018-11-01 Thread Junio C Hamano
Johannes Sixt writes: > Am 01.11.18 um 07:12 schrieb Junio C Hamano: >> "Johannes Schindelin via GitGitGadget" >> writes: >> >>> The `--preserve-merges` mode of the `rebase` command is slated to be >>> deprecated soon, ... >> >> Is everybody on board on this statement? I vaguely recall that

Re: [PATCH v2 06/16] sequencer: refactor sequencer_add_exec_commands() to work on a todo_list

2018-11-01 Thread Alban Gruin
Le 30/10/2018 à 17:47, Phillip Wood a écrit : > On 27/10/2018 22:29, Alban Gruin wrote: >> This refactors sequencer_add_exec_commands() to work on a todo_list to >> avoid redundant reads and writes to the disk. >> >> An obvious way to do this would be to insert the `exec' command between >> the

Re: [PATCH v2 04/16] sequencer: introduce todo_list_write_to_file()

2018-11-01 Thread Alban Gruin
Hi Phillip, Le 30/10/2018 à 17:28, Phillip Wood a écrit : > Hi Alban > > I like the direction this is going, it is an improvement on re-scanning > the list at the end of each function. > > On 27/10/2018 22:29, Alban Gruin wrote: >> This introduce a new function to recreate the text of a todo

Re: [PATCH v5] branch: introduce --show-current display option

2018-11-01 Thread Jeff King
On Fri, Oct 26, 2018 at 09:52:24AM +0900, Junio C Hamano wrote: > Eric Sunshine writes: > > >> + test_when_finished "git tag -d branch-and-tag-name" && > >> + git tag branch-and-tag-name && > > > > If git-tag crashes before actually creating the new tag, then "git tag > > -d",

Re: [PATCH v4 9/9] Documentation/config: add odb..promisorRemote

2018-11-01 Thread Jeff King
On Wed, Oct 31, 2018 at 07:28:09AM +0100, Christian Couder wrote: > > For (2), I would like to see us improve the remote helper > > infrastructure instead of introducing a new ODB helper. Remote > > helpers are already permitted to fetch some objects without listing > > refs --- perhaps we will

<    6   7   8   9   10   11   12   13   14   15   >