Re: [PATCH 3/3] transport.c: introduce core.alternateRefsPrefixes

2018-09-21 Thread Eric Sunshine
On Thu, Sep 20, 2018 at 2:04 PM Taylor Blau wrote: > The recently-introduced "core.alternateRefsCommand" allows callers to > specify with high flexibility the tips that they wish to advertise from > alternates. This flexibility comes at the cost of some inconvenience > when the caller only wishes

[no subject]

2018-09-21 Thread FIGADERE, LAURENT
Hi, Coming back to you with some updates. I understand finally interest of difference between 'from' and 'at'. The point is: is it a bug if the 'git status' provide the origin/HEAD instead of HEAD SHA1? If you want a test case with screenshots, let me know. Regards, Laurent

Self-interest

2018-09-21 Thread Mrs.Jamila Valentin
Hi, If you wouldn't mind, please confirm if you received previous email correspondence as I have been trying to reach you regarding the above subject. Sincerely, Jamila

Re: [RFC PATCH v4 1/3] Add support for nested aliases

2018-09-21 Thread Tim Schumacher
On 17.09.18 17:37, Junio C Hamano wrote: Tim Schumacher writes: On 08.09.18 15:28, Duy Nguyen wrote: On Sat, Sep 8, 2018 at 12:44 AM Tim Schumacher wrote: + /* +* It could be an alias -- this works around the insanity * of overriding "git log

Very simple popen() code request, ground-shaking functionality openned by it

2018-09-21 Thread Sebastian Gniazdowski
Hello! Git default progress indicator for clone is very unattractive, IMO. It does its job in providing all the operation details very well, but I bet most of users strongly dream about a gauge box! Have a look at my gauge box constructed as git-stderr pipe script: https://asciinema.org/a/2024

Re: [PATCH 3/3] transport.c: introduce core.alternateRefsPrefixes

2018-09-21 Thread Taylor Blau
On Fri, Sep 21, 2018 at 03:19:20AM -0400, Eric Sunshine wrote: > On Thu, Sep 20, 2018 at 2:04 PM Taylor Blau wrote: > > The recently-introduced "core.alternateRefsCommand" allows callers to > > specify with high flexibility the tips that they wish to advertise from > > alternates. This flexibility

Segfault in master due to 4fbcca4eff

2018-09-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Sep 21 2018, Junio C Hamano wrote: > * ds/reachable (2018-08-28) 19 commits > (merged to 'next' on 2018-08-28 at b1634b371d) > + commit-reach: correct accidental #include of C file > (merged to 'next' on 2018-08-22 at 17f3275afb) > + commit-reach: use can_all_from_reach > + commit

Re: Segfault in master due to 4fbcca4eff

2018-09-21 Thread Derrick Stolee
On 9/21/2018 10:30 AM, Ævar Arnfjörð Bjarmason wrote: On Fri, Sep 21 2018, Junio C Hamano wrote: * ds/reachable (2018-08-28) 19 commits (merged to 'next' on 2018-08-28 at b1634b371d) + commit-reach: correct accidental #include of C file (merged to 'next' on 2018-08-22 at 17f3275afb) +

Re: Segfault in master due to 4fbcca4eff

2018-09-21 Thread Ævar Arnfjörð Bjarmason
On Fri, Sep 21 2018, Derrick Stolee wrote: > On 9/21/2018 10:30 AM, Ævar Arnfjörð Bjarmason wrote: >> On Fri, Sep 21 2018, Junio C Hamano wrote: >> >>> * ds/reachable (2018-08-28) 19 commits >>>(merged to 'next' on 2018-08-28 at b1634b371d) >>> + commit-reach: correct accidental #include o

Re: Segfault in master due to 4fbcca4eff

2018-09-21 Thread Derrick Stolee
On 9/21/2018 10:40 AM, Ævar Arnfjörð Bjarmason wrote: On Fri, Sep 21 2018, Derrick Stolee wrote: This error was reported by Peff [1] and fixed in [2], but as stated [3] I was waiting for more review before sending a v3. I'll send that v3 shortly, responding to the feedback so far. -Stolee [1

[PATCH v3 0/2] Properly peel tags in can_all_from_reach_with_flags()

2018-09-21 Thread Derrick Stolee via GitGitGadget
As Peff reported [1], the refactored can_all_from_reach_with_flags() method does not properly peel tags. Since the helper method can_all_from_reach() and code in t/helper/test-reach.c all peel tags before getting to this method, it is not super-simple to create a test that demonstrates this. I mod

[PATCH v3 1/2] commit-reach: properly peel tags

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The can_all_from_reach_with_flag() algorithm was refactored in 4fbcca4e "commit-reach: make can_all_from_reach... linear" but incorrectly assumed that all objects provided were commits. During a fetch negotiation, ok_to_give_up() in upload-pack.c may provide unpeeled tags to

[PATCH v3 2/2] commit-reach: fix memory and flag leaks

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The can_all_from_reach_with_flag() method uses 'assign_flag' as a value we can use to mark objects temporarily during our commit walk. The intent is that these flags are removed from all objects before returning. However, this is not the case. The 'from' array could also con

[PATCH v3 0/1] contrib: Add script to show uncovered "new" lines

2018-09-21 Thread Derrick Stolee via GitGitGadget
We have coverage targets in our Makefile for using gcov to display line coverage based on our test suite. The way I like to do it is to run: make coverage-test make coverage-report This leaves the repo in a state where every X.c file that was covered has an X.c.gcov file containing the coverage c

[PATCH v3 1/1] contrib: add coverage-diff script

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee We have coverage targets in our Makefile for using gcov to display line coverage based on our test suite. The way I like to do it is to run: make coverage-test make coverage-report This leaves the repo in a state where every X.c file that was covered has an X.c.gcov

Re: [PATCH v3 0/1] contrib: Add script to show uncovered "new" lines

2018-09-21 Thread Derrick Stolee
On 9/21/2018 11:15 AM, Derrick Stolee via GitGitGadget wrote: For example, I ran this against the 'next' branch (22e244b) versus 'master' (150f307) and got the following output: fsck.c fb8952077df (René Scharfe 2018-09-03 14:49:26 + 212) die_errno("Could not read '%s'

Re: [PATCH v2 0/6] Use generation numbers for --topo-order

2018-09-21 Thread Derrick Stolee
On 9/18/2018 2:05 AM, Ævar Arnfjörð Bjarmason wrote: On Tue, Sep 18 2018, Derrick Stolee via GitGitGadget wrote: Thanks. Good to see the commit graph used for more stuff. On the Linux repository, I got the following performance results when comparing to the previous version with or without a c

Re: Segfault in master due to 4fbcca4eff

2018-09-21 Thread Junio C Hamano
Derrick Stolee writes: > On 9/21/2018 10:40 AM, Ævar Arnfjörð Bjarmason wrote: >> On Fri, Sep 21 2018, Derrick Stolee wrote: >> >>> >>> This error was reported by Peff [1] and fixed in [2], but as stated >>> [3] I was waiting for more review before sending a v3. I'll send that >>> v3 shortly, res

[PATCH v5 05/23] blame.c: rename "repo" argument to "r"

2018-09-21 Thread Nguyễn Thái Ngọc Duy
The current naming convention for 'struct repository *' is 'r' for temporary variables or arguments. I did not notice this. Since we're updating blame.c again in the next patch, let's fix this. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- blame.c | 36 ++

[PATCH v5 12/23] merge-blobs.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/merge-tree.c | 2 +- merge-blobs.c| 15 +++ merge-blobs.h| 7 +-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index f802

[PATCH v5 07/23] grep.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/grep.c | 4 ++-- builtin/log.c | 2 +- grep.c | 13 - grep.h | 7 +-- revision.c | 4 ++-- 5 files changed, 18 insertions(+), 12 deletions(-) diff --git a/builtin/grep.c b/buil

[PATCH v5 11/23] ll-merge.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- apply.c| 9 ++--- builtin/checkout.c | 3 ++- diff.c | 2 +- ll-merge.c | 17 + ll-merge.h | 5 - merge-blobs.c | 3 ++- merge-recursive.c | 3 ++- no

[PATCH v5 08/23] diff.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
A new variant repo_diff_setup() is added that takes 'struct repository *' and diff_setup() becomes a thin macro around it that is protected by NO_THE_REPOSITORY_COMPATIBILITY_MACROS, similar to NO_THE_INDEX_ The plan is these macros will always be defined for all library files and the macros ar

[PATCH v5 10/23] diff-lib.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- diff-lib.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/diff-lib.c b/diff-lib.c index 88a98b1c06..c54773fe12 100644 --- a/diff-lib.c +++ b/diff-lib.c @@ -70,7 +70,7 @@ static int match

[PATCH v5 06/23] diff.c: remove the_index dependency in textconv() functions

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- blame.c| 7 --- builtin/cat-file.c | 6 -- builtin/log.c | 3 ++- combine-diff.c | 27 --- diff.c | 17 + diff.h | 9 +++-- d

[PATCH v5 13/23] merge.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/merge.c | 8 +--- builtin/pull.c | 7 +-- cache.h | 6 -- merge.c | 20 +++- sequencer.c | 6 +++--- 5 files changed, 28 insertions(+), 19 deletions(-) diff --git a

[PATCH v5 14/23] patch-ids.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/log.c | 2 +- patch-ids.c | 4 ++-- patch-ids.h | 3 ++- revision.c| 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 4b602236d6..978fe7c10f 100644 --- a/

[PATCH v5 02/23] read-cache.c: remove 'const' from index_has_changes()

2018-09-21 Thread Nguyễn Thái Ngọc Duy
This function calls do_diff_cache() which eventually needs to set this "istate" to unpack_options->src_index [1]. This is an unfortunate fact that unpack_trees() _will_ update [2] src_index so we can't really pass a const index_state there. Just remove 'const'. [1] Right now diff_cache() in diff-l

[PATCH v5 01/23] archive.c: remove implicit dependency the_repository

2018-09-21 Thread Nguyễn Thái Ngọc Duy
The new "repo" field in archive_args has been added since b612ee202a (archive.c: avoid access to the_index - 2018-08-13). Use it instead of hard coding the_repository. Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- archive.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

[PATCH v5 09/23] read-cache.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- read-cache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/read-cache.c b/read-cache.c index 6f772b2885..563500fe98 100644 --- a/read-cache.c +++ b/read-cache.c @@ -823,7 +823,7 @@ struct cache_entry

[PATCH v5 00/23] Kill the_index part 4

2018-09-21 Thread Nguyễn Thái Ngọc Duy
v5 only has commit message update in one patch. range-diff below. Also, from "What's cooking" today On Fri, Sep 21, 2018 at 7:22 AM Junio C Hamano wrote: > * nd/the-index (2018-09-17) 23 commits > ... > > Will merge to 'next'. > > As expected, this has close to irritating amount of textual co

[PATCH v5 20/23] tree-diff.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- tree-diff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tree-diff.c b/tree-diff.c index 57a15f51f0..16b28ff6d6 100644 --- a/tree-diff.c +++ b/tree-diff.c @@ -605,7 +605,7 @@ static void try_to_follow_re

[PATCH v5 17/23] userdiff.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- archive-zip.c | 14 +- builtin/grep.c | 3 ++- combine-diff.c | 2 +- diff.c | 40 +++- diff.h | 3 ++- diffcore-pickaxe.c | 4 ++-- grep

[PATCH v5 19/23] submodule.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/pull.c | 2 +- submodule.c| 28 +--- submodule.h| 9 ++--- transport.c| 9 ++--- 4 files changed, 30 insertions(+), 18 deletions(-) diff --git a/builtin/pull.c b/builtin/

[PATCH v5 04/23] combine-diff.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- combine-diff.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/combine-diff.c b/combine-diff.c index de7695e728..4fa7707b57 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -1054,7 +1054,8 @@ static vo

[PATCH v5 03/23] diff.c: reduce implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
diff and textconv code has so widespread use that it's hard to simply update their api and all call sites at once because it would result in a big patch. For now reduce the_index references to two places: diff_setup() and fill_textconv(). Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C

[PATCH v5 15/23] sha1-file.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/difftool.c | 2 +- builtin/hash-object.c | 2 +- builtin/replace.c | 2 +- builtin/update-index.c | 2 +- cache.h| 4 ++-- diff.c | 20 - notes-merge.c

[PATCH v5 18/23] line-range.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- builtin/blame.c | 2 +- line-log.c | 4 ++-- line-range.c| 22 ++ line-range.h| 6 -- 4 files changed, 21 insertions(+), 13 deletions(-) diff --git a/builtin/blame.c b/builtin/blame.c i

[PATCH v5 16/23] rerere.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
The reason rerere(), rerere_forget() and rerere_remaining() take a struct repository instead of struct index_state is not obvious from the patch: Deep in update_paths() and find_conflict(), hold_locked_index() and read_index() are called. These functions assumes the index path at $GIT_DIR/index wh

[PATCH v5 21/23] ws.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- apply.c | 8 +--- cache.h | 2 +- diff.c | 6 +++--- ws.c| 5 ++--- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/apply.c b/apply.c index 571b89c2e0..fdae1d423b 100644 --- a/apply.c +++ b/apply.c @@

[PATCH v5 22/23] revision.c: remove implicit dependency on the_index

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- .../technical/api-revision-walking.txt| 4 +-- bisect.c | 4 +-- builtin/add.c | 4 +-- builtin/am.c | 6 ++-- b

[PATCH v5 23/23] revision.c: reduce implicit dependency the_repository

2018-09-21 Thread Nguyễn Thái Ngọc Duy
Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- list-objects.c | 8 +--- revision.c | 44 +++- revision.h | 2 +- 3 files changed, 29 insertions(+), 25 deletions(-) diff --git a/list-objects.c b/list-objects.c index c99

Re: [RFC PATCH v4 1/3] Add support for nested aliases

2018-09-21 Thread Junio C Hamano
Tim Schumacher writes: > it is located at the top of the while() loop. Giving an example is nice, but > wouldn't > it be better to say something like the following? > > /* >* Check if av[0] is a command before seeing if it is an >* alias to avoid taking over existing comman

Re: git check-ignore ignores negated entries

2018-09-21 Thread Duy Nguyen
On Thu, Sep 20, 2018 at 7:25 PM David Alphus wrote: > In looking through check-ignore.c, it appears that we check that > last_exclude_matching() returns an exclude object. It should be noted > that we do not consider that exclude struct can be set with the > EXC_FLAG_NEGATIVE flag. This flag says

Re: [PATCH v5 9/9] submodule: support reading .gitmodules when it's not in the working tree

2018-09-21 Thread Junio C Hamano
Antonio Ospite writes: > Protecting the problematic submodules function could work for now, but > I'd like to have more comments, my proposal is: > > diff --git a/builtin/grep.c b/builtin/grep.c > index 601f801158..52b45de749 100644 > --- a/builtin/grep.c > +++ b/builtin/grep.c > @@ -427,6 +427,1

Re: [PATCH] fetch-object.h: add missing declaration (hdr-check)

2018-09-21 Thread Junio C Hamano
Ramsay Jones writes: > Signed-off-by: Ramsay Jones > --- > > Hi Junio, > > This is the patch I needed for the current 'next' branch to get > a clean 'hdr-check' Which means that this is a fix on top of jt/lazy-object-fetch-fix topic, I think. Will apply there. Thanks.

Re: [PATCH] userdiff.h: add missing declaration (hdr-check)

2018-09-21 Thread Junio C Hamano
Ramsay Jones writes: > Signed-off-by: Ramsay Jones > --- > > Hi Junio, > > ... and this is the patch I needed for the current 'pu' branch. Which in turn means that this is to fix 5b338d60 ("userdiff.c: remove implicit dependency on the_index", 2018-09-15) and should be rolled into nd/the_index

Re: [PATCH] userdiff.h: add missing declaration (hdr-check)

2018-09-21 Thread Duy Nguyen
On Fri, Sep 21, 2018 at 6:24 PM Junio C Hamano wrote: > > Ramsay Jones writes: > > > Signed-off-by: Ramsay Jones > > --- > > > > Hi Junio, > > > > ... and this is the patch I needed for the current 'pu' branch. > > Which in turn means that this is to fix 5b338d60 ("userdiff.c: > remove implicit

Re: [PATCH 2/3] git-column.1: clarify initial description, provide examples

2018-09-21 Thread Junio C Hamano
frede...@ofb.net writes: > On Thu, Sep 20, 2018 at 06:23:03PM +0200, Duy Nguyen wrote: >> On Wed, Sep 19, 2018 at 03:59:58PM -0700, Junio C Hamano wrote: >> > > @@ -23,7 +26,7 @@ OPTIONS >> > > >> > > --mode=:: >> > > Specify layout mode. See configuration variable column.ui for >> >

Re: [PATCH 2/3] transport.c: introduce core.alternateRefsCommand

2018-09-21 Thread Junio C Hamano
Taylor Blau writes: > +extract_haves () { > + depacketize - | grep -o '^.* \.have' Not portable, isn't it? cf. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html

Re: [PATCH 3/3] transport.c: introduce core.alternateRefsPrefixes

2018-09-21 Thread Junio C Hamano
Eric Sunshine writes: > On Thu, Sep 20, 2018 at 2:04 PM Taylor Blau wrote: >> The recently-introduced "core.alternateRefsCommand" allows callers to >> specify with high flexibility the tips that they wish to advertise from >> alternates. This flexibility comes at the cost of some inconvenience >

Re: [PATCH 3/3] transport.c: introduce core.alternateRefsPrefixes

2018-09-21 Thread Junio C Hamano
Taylor Blau writes: > ...' block with your suggestion above. It's tempting to introduce it as: > > expect_haves() { > printf "%s .have\n" $(git rev-parse -- $@) > } > > And call it as: > > expect_haves one three two >expect > > But I'm not sure whether I think that this is better or wor

Re: [PATCH v5 17/23] userdiff.c: remove implicit dependency on the_index

2018-09-21 Thread Junio C Hamano
Nguyễn Thái Ngọc Duy writes: > diff --git a/userdiff.h b/userdiff.h > index 2ef0ce5452..dad3fc03c1 100644 > --- a/userdiff.h > +++ b/userdiff.h > @@ -21,7 +21,8 @@ struct userdiff_driver { > > int userdiff_config(const char *k, const char *v); > struct userdiff_driver *userdiff_find_by_name(

Re: [PATCH] fetch-object.h: add missing declaration (hdr-check)

2018-09-21 Thread Ramsay Jones
On 21/09/18 17:21, Junio C Hamano wrote: > Ramsay Jones writes: > >> Signed-off-by: Ramsay Jones >> --- >> >> Hi Junio, >> >> This is the patch I needed for the current 'next' branch to get >> a clean 'hdr-check' > > Which means that this is a fix on top of jt/lazy-object-fetch-fix > topic,

Re: [PATCH 2/3] git-column.1: clarify initial description, provide examples

2018-09-21 Thread frederik
Thank you Junio, maybe I will have another chance to get practice sending a v2 patch. On Fri, Sep 21, 2018 at 09:32:00AM -0700, Junio C Hamano wrote: > frede...@ofb.net writes: > > > On Thu, Sep 20, 2018 at 06:23:03PM +0200, Duy Nguyen wrote: > >> On Wed, Sep 19, 2018 at 03:59:58PM -0700, Junio C

credential..helper with partial url path

2018-09-21 Thread Zych, David M
Suppose I need to use different credential.helper values for different repositories on the same HTTPS host. Ideally I would like to be able to write this logic using a partial URL path prefix, for example in ~/.gitconfig [credential "https://example.com/prefix1/foo.git";] helper = !ZZ

Re: [PATCH] fetch-object.h: add missing declaration (hdr-check)

2018-09-21 Thread Junio C Hamano
Ramsay Jones writes: > BTW, I notice that patch #9 (commit-reach.h: add missing declarations > (hdr-check)) didn't make it onto 'pu' - was there something else I > needed to do? (I am still in two minds about sending an RFC patch > on-top of patch #9). I refrained from queuing it as I did not s

Re: What's cooking in git.git (Sep 2018, #04; Thu, 20)

2018-09-21 Thread Johannes Sixt
Am 21.09.18 um 07:22 schrieb Junio C Hamano: > The tip of 'next' hasn't been rewound yet. The three GSoC "rewrite > in C" topics are still unclassified in this "What's cooking" report, > but I am hoping that we can have them in 'next' sooner rather than > later. I got an impression that Dscho wan

Re: What's cooking in git.git (Sep 2018, #04; Thu, 20)

2018-09-21 Thread Junio C Hamano
Johannes Sixt writes: > Am 21.09.18 um 07:22 schrieb Junio C Hamano: >> The tip of 'next' hasn't been rewound yet. The three GSoC "rewrite >> in C" topics are still unclassified in this "What's cooking" report, >> but I am hoping that we can have them in 'next' sooner rather than >> later. I go

[PATCH v3 0/7] Use generation numbers for --topo-order

2018-09-21 Thread Derrick Stolee via GitGitGadget
This patch series performs a decently-sized refactoring of the revision-walk machinery. Well, "refactoring" is probably the wrong word, as I don't actually remove the old code. Instead, when we see certain options in the 'rev_info' struct, we redirect the commit-walk logic to a new set of methods t

[PATCH v3 1/7] prio-queue: add 'peek' operation

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When consuming a priority queue, it can be convenient to inspect the next object that will be dequeued without actually dequeueing it. Our existing library did not have such a 'peek' operation, so add it as prio_queue_peek(). Add a reference-level comparison in t/helper/test

[PATCH v3 2/7] test-reach: add run_three_modes method

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The 'test_three_modes' method assumes we are using the 'test-tool reach' command for our test. However, we may want to use the data shape of our commit graph and the three modes (no commit-graph, full commit-graph, partial commit-graph) for other git commands. Split test_thr

[PATCH v3 3/7] test-reach: add rev-list tests

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee The rev-list command is critical to Git's functionality. Ensure it works in the three commit-graph environments constructed in t6600-test-reach.sh. Here are a few important types of rev-list operations: * Basic: git rev-list --topo-order HEAD * Range: git rev-list --topo-ord

[PATCH v3 6/7] revision.h: add whitespace in flag definitions

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee In anticipation of adding longer flag names in the next change, add an extra tab to each flag definition in revision.h. Signed-off-by: Derrick Stolee --- revision.h | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/revision.

[PATCH v3 4/7] revision.c: begin refactoring --topo-order logic

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When running 'git rev-list --topo-order' and its kin, the topo_order setting in struct rev_info implies the limited setting. This means that the following things happen during prepare_revision_walk(): * revs->limited implies we run limit_list() to walk the entire reachable

[PATCH v3 5/7] commit/revisions: bookkeeping before refactoring

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee There are a few things that need to move around a little before making a big refactoring in the topo-order logic: 1. We need access to record_author_date() and compare_commits_by_author_date() in revision.c. These are used currently by sort_in_topological_order() in co

[PATCH v3 7/7] revision.c: refactor basic topo-order logic

2018-09-21 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee When running a command like 'git rev-list --topo-order HEAD', Git performed the following steps: 1. Run limit_list(), which parses all reachable commits, adds them to a linked list, and distributes UNINTERESTING flags. If all unprocessed commits are UNINTERESTING, then

Re: [PATCH] fetch-object.h: add missing declaration (hdr-check)

2018-09-21 Thread Derrick Stolee
On 9/21/2018 1:05 PM, Junio C Hamano wrote: Ramsay Jones writes: BTW, I notice that patch #9 (commit-reach.h: add missing declarations (hdr-check)) didn't make it onto 'pu' - was there something else I needed to do? (I am still in two minds about sending an RFC patch on-top of patch #9). I

Re: [PATCH 9/9] commit-reach.h: add missing declarations (hdr-check)

2018-09-21 Thread Derrick Stolee
On 9/20/2018 11:35 AM, Ramsay Jones wrote: On 20/09/18 00:38, Derrick Stolee wrote: On 9/18/2018 8:15 PM, Ramsay Jones wrote: Signed-off-by: Ramsay Jones ---   commit-reach.h | 5 +++--   1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/commit-reach.h b/commit-reach.h index 7d31

Re: [PATCH 2/3] transport.c: introduce core.alternateRefsCommand

2018-09-21 Thread Taylor Blau
On Fri, Sep 21, 2018 at 09:39:14AM -0700, Junio C Hamano wrote: > Taylor Blau writes: > > > +extract_haves () { > > + depacketize - | grep -o '^.* \.have' > > Not portable, isn't it? > > cf. http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html Good catch. Definitely not portable,

Re: [PATCH 3/3] transport.c: introduce core.alternateRefsPrefixes

2018-09-21 Thread Taylor Blau
On Fri, Sep 21, 2018 at 09:45:11AM -0700, Junio C Hamano wrote: > Taylor Blau writes: > > > ...' block with your suggestion above. It's tempting to introduce it as: > > > > expect_haves() { > > printf "%s .have\n" $(git rev-parse -- $@) > > } > > > > And call it as: > > > > expect_haves

Re: [PATCH 2/3] transport.c: introduce core.alternateRefsCommand

2018-09-21 Thread Taylor Blau
On Fri, Sep 21, 2018 at 01:48:25PM -0400, Taylor Blau wrote: > On Fri, Sep 21, 2018 at 09:39:14AM -0700, Junio C Hamano wrote: > > Taylor Blau writes: > > > > > +extract_haves () { > > > + depacketize - | grep -o '^.* \.have' > > > > Not portable, isn't it? > > > > cf. http://pubs.opengroup.org/on

[PATCH v2 0/2] Check presence of targets when fetching to partial clone

2018-09-21 Thread Jonathan Tan
New in v2: - added patch to clarify in documentation what check_connected() does - renamed quickfetch() to check_exist_and_connected() to better reflect what it does - also updated its documentation; I avoided usage of "wanted objects" and used "fetch targets" instead to clarify that I'm o

[PATCH v2 2/2] fetch: in partial clone, check presence of targets

2018-09-21 Thread Jonathan Tan
When fetching an object that is known as a promisor object to the local repository, the connectivity check in quickfetch() in builtin/fetch.c succeeds, causing object transfer to be bypassed. However, this should not happen if that object is merely promised and not actually present. Because this h

[PATCH v2 1/2] connected: document connectivity in partial clones

2018-09-21 Thread Jonathan Tan
In acb0c57260 ("fetch: support filters", 2017-12-08), check_connected() was extended to allow objects to either be promised to be available (if the repository is a partial clone) or to be present; previously, this function required the latter. However, this change was not reflected in the documenta

[PATCH v2 1/3] transport.c: extract 'fill_alternate_refs_command'

2018-09-21 Thread Taylor Blau
To list alternate references, 'read_alternate_refs' creates a child process running 'git for-each-ref' in the alternate's Git directory. Prepare to run other commands besides 'git for-each-ref' by introducing and moving the relevant code from 'read_alternate_refs' to 'fill_alternate_refs_command'.

[PATCH v2 3/3] transport.c: introduce core.alternateRefsPrefixes

2018-09-21 Thread Taylor Blau
The recently-introduced "core.alternateRefsCommand" allows callers to specify with high flexibility the tips that they wish to advertise from alternates. This flexibility comes at the cost of some inconvenience when the caller only wishes to limit the advertisement to one or more prefixes. For exa

[PATCH v2 2/3] transport.c: introduce core.alternateRefsCommand

2018-09-21 Thread Taylor Blau
When in a repository containing one or more alternates, Git would sometimes like to list references from its alternates. For example, 'git receive-pack' list the objects pointed to by alternate references as special ".have" references. Listing ".have" references is designed to make pushing changes

[PATCH v2 0/3] Filter alternate references

2018-09-21 Thread Taylor Blau
Hi, Attached is the second re-roll of my series to teach "core.alternateRefsCommand" and "core.alternateRefsPrefixes". I have included a range-diff below (which I have taught my scripts to do by default now), but will summarize the changes as usual: * Clean up t5410 according to Peff's suggest

[PATCH] fetch: Ensure that fetch.recurseSubmodules overrides submodule.recurse.

2018-09-21 Thread Marc Branchaud
Also document this fact. Signed-off-by: Marc Branchaud --- I ran into this bug when I had both fetch.recurseSubmodules=on-demand and submodule.recurse=true, and submodule.recurse was set *after* fetch.recurseSubmodules in my config. The fix ensures that fetch.recurseSubmodules always overrides

Re: [PATCH] fetch: Ensure that fetch.recurseSubmodules overrides submodule.recurse.

2018-09-21 Thread Stefan Beller
On Fri, Sep 21, 2018 at 12:00 PM Marc Branchaud wrote: > > Also document this fact. > > Signed-off-by: Marc Branchaud > --- > > I ran into this bug when I had both fetch.recurseSubmodules=on-demand and > submodule.recurse=true, and submodule.recurse was set *after* > fetch.recurseSubmodules in my

Re: [PATCH 2/3] transport.c: introduce core.alternateRefsCommand

2018-09-21 Thread Junio C Hamano
Taylor Blau writes: > In fact, I think that we can go even further: since we don't need to > catch the beginning '^.*' (without -o), we can instead: > > extract_haves () { > depacketize - | grep '\.have' | sed -e 's/\\0.*$//g' > } Do not pipe grep into sed, unless you have an overly elab

Re: [PATCH v2 1/2] commit-graph write: add progress output

2018-09-21 Thread Derrick Stolee
On 9/7/2018 2:29 PM, Ævar Arnfjörð Bjarmason wrote: -void write_commit_graph_reachable(const char *obj_dir, int append); +void write_commit_graph_reachable(const char *obj_dir, int append, + int report_progress); void write_commit_graph(const char *obj_dir,

Re: [PATCH v2 2/3] transport.c: introduce core.alternateRefsCommand

2018-09-21 Thread Eric Sunshine
On Fri, Sep 21, 2018 at 2:47 PM Taylor Blau wrote: > When in a repository containing one or more alternates, Git would > sometimes like to list references from its alternates. For example, 'git > receive-pack' list the objects pointed to by alternate references as > special ".have" references. > [

Re: [PATCH v2 1/2] connected: document connectivity in partial clones

2018-09-21 Thread Junio C Hamano
Jonathan Tan writes: > In acb0c57260 ("fetch: support filters", 2017-12-08), check_connected() > was extended to allow objects to either be promised to be available (if > the repository is a partial clone) or to be present; previously, this > function required the latter. However, this change was

[PATCH v9 1/8] list-objects: store common func args in struct

2018-09-21 Thread Matthew DeVore
This will make utility functions easier to create, as done by the next patch. Signed-off-by: Matthew DeVore --- list-objects.c | 158 +++-- 1 file changed, 74 insertions(+), 84 deletions(-) diff --git a/list-objects.c b/list-objects.c index c99c47ac1.

[PATCH v9 2/8] list-objects: refactor to process_tree_contents

2018-09-21 Thread Matthew DeVore
This will be used in a follow-up patch to reduce indentation needed when invoking the logic conditionally. i.e. rather than: if (foo) { while (...) { /* this is very indented */ } } we will have: if (foo) process_tree_contents(...); Signed-off-by: Matthew

[PATCH v9 4/8] rev-list: handle missing tree objects properly

2018-09-21 Thread Matthew DeVore
Previously, we assumed only blob objects could be missing. This patch makes rev-list handle missing trees like missing blobs. The --missing=* and --exclude-promisor-objects flags now work for trees as they already do for blobs. This is demonstrated in t6112. Signed-off-by: Matthew DeVore --- bui

[PATCH v9 3/8] list-objects: always parse trees gently

2018-09-21 Thread Matthew DeVore
If parsing fails when revs->ignore_missing_links and revs->exclude_promisor_objects are both false, we print the OID anyway in the die("bad tree object...") call, so any message printed by parse_tree_gently() is superfluous. Signed-off-by: Matthew DeVore --- list-objects.c | 4 +--- 1 file chang

[PATCH v9 0/8] filter: support for excluding all trees and blobs

2018-09-21 Thread Matthew DeVore
Since v8, I cleaned up the test scripts in the following ways: - correct order of expect/actual arguments to test_cmp - correct pipe placement - put flags before positional arguments Also, removed some junk in the commit message of the 5th patch. Thank you, Matthew DeVore (8): list-objects:

[PATCH v9 5/8] revision: mark non-user-given objects instead

2018-09-21 Thread Matthew DeVore
Currently, list-objects.c incorrectly treats all root trees of commits as USER_GIVEN. Also, it would be easier to mark objects that are non-user-given instead of user-given, since the places in the code where we access an object through a reference are more obvious than the places where we access a

[PATCH v9 6/8] list-objects-filter: use BUG rather than die

2018-09-21 Thread Matthew DeVore
In some cases in this file, BUG makes more sense than die. In such cases, a we get there from a coding error rather than a user error. 'return' has been removed following some instances of BUG since BUG does not return. Signed-off-by: Matthew DeVore --- list-objects-filter.c | 11 --- 1

[PATCH v9 7/8] list-objects-filter-options: do not over-strbuf_init

2018-09-21 Thread Matthew DeVore
The function gently_parse_list_objects_filter is either called with errbuf=STRBUF_INIT or errbuf=NULL, but that function calls strbuf_init when errbuf is not NULL. strbuf_init is only necessary if errbuf contains garbage, and risks a memory leak if errbuf already has a non-STRBUF_INIT state. It sho

[PATCH v9 8/8] list-objects-filter: implement filter tree:0

2018-09-21 Thread Matthew DeVore
Teach list-objects the "tree:0" filter which allows for filtering out all tree and blob objects (unless other objects are explicitly specified by the user). The purpose of this patch is to allow smaller partial clones. The name of this filter - tree:0 - does not explicitly specify that it also fil

Re: [PATCH v3 1/5] CodingGuidelines: add shell piping guidelines

2018-09-21 Thread Matthew DeVore
On Thu, Sep 20, 2018 at 7:06 PM Eric Sunshine wrote: > > On Thu, Sep 20, 2018 at 9:43 PM Matthew DeVore wrote: > > Add two guidelines: > > Probably s/two/three/ or s/two/several/ since the patch now adds three > guidelines. > > > - pipe characters should appear at the end of lines, and not cause

Re: [PATCH v2 2/3] transport.c: introduce core.alternateRefsCommand

2018-09-21 Thread Junio C Hamano
Taylor Blau writes: > +core.alternateRefsCommand:: > + When listing references from an alternate (e.g., in the case of > ".have"), use It is not clear how (e.g.,...) connects to what is said in the sentence. "When advertising tips of available history from an alternate, use ..." without sa

Re: [PATCH v2 2/3] transport.c: introduce core.alternateRefsCommand

2018-09-21 Thread Eric Sunshine
On Fri, Sep 21, 2018 at 2:47 PM Taylor Blau wrote: > When in a repository containing one or more alternates, Git would > sometimes like to list references from its alternates. For example, 'git > receive-pack' list the objects pointed to by alternate references as > special ".have" references. > [

Re: [PATCH v2 3/3] transport.c: introduce core.alternateRefsPrefixes

2018-09-21 Thread Junio C Hamano
Taylor Blau writes: > +core.alternateRefsPrefixes:: > + When listing references from an alternate, list only references that > begin > + with the given prefix. Prefixes match as if they were given as > arguments to > + linkgit:git-for-each-ref[1]. To list multiple prefixes, separate

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

2018-09-21 Thread Junio C Hamano
"Derrick Stolee via GitGitGadget" writes: > Changes in V3: I added a new patch that updates the tab-alignment for flags > in revision.h before adding new ones (Thanks, Ævar!). This is most unwelcome while other topics are in flight that caused unnecessary conflict. It would have been very welco

Re: [PATCH v2 3/3] transport.c: introduce core.alternateRefsPrefixes

2018-09-21 Thread Jeff King
On Fri, Sep 21, 2018 at 02:14:17PM -0700, Junio C Hamano wrote: > Taylor Blau writes: > > > +core.alternateRefsPrefixes:: > > + When listing references from an alternate, list only references that > > begin > > + with the given prefix. Prefixes match as if they were given as > > arguments

  1   2   >