Re: [PATCH 0/9] Add missing includes and forward declares

2018-08-14 Thread Elijah Newren
On Tue, Aug 14, 2018 at 10:45 PM Junio C Hamano wrote: > Elijah Newren writes: > > > On Mon, Aug 13, 2018 at 11:24 AM Junio C Hamano wrote: > >> Jeff King writes: > > > >> As things are slowly moving out of the so-far kitchen-sink "cache.h" > >> into more specific subsystem headers (like

Re: [PATCHv3 1/6] Add missing includes and forward declares

2018-08-14 Thread Elijah Newren
On Tue, Aug 14, 2018 at 10:10 PM Jonathan Nieder wrote: > > Elijah Newren wrote: > > > Subject: Add missing includes and forward declares > > nit: s/declares/declarations/ Thanks. > This is a huge patch. Was it autogenerated or generated manually? > Can the commit message say something about

Re: Syncing HEAD

2018-08-14 Thread Christian Couder
On Tue, Aug 14, 2018 at 11:47 PM, Jeff King wrote: > On Tue, Aug 14, 2018 at 05:06:16PM -0400, Jeff King wrote: > >> On Tue, Aug 14, 2018 at 10:09:37PM +0200, Christian Couder wrote: >> >> > When cloning with --mirror, the clone gets its HEAD initialized with >> > the value HEAD has in its origin

Re: [PATCH 0/9] Add missing includes and forward declares

2018-08-14 Thread Junio C Hamano
Elijah Newren writes: > On Mon, Aug 13, 2018 at 11:24 AM Junio C Hamano wrote: >> Jeff King writes: > >> As things are slowly moving out of the so-far kitchen-sink "cache.h" >> into more specific subsystem headers (like object-store.h), we may >> actually want to tighten the "header that

Re: [PATCHv3 6/6] Add missing includes and forward declares

2018-08-14 Thread Jonathan Nieder
Hi, Elijah Newren wrote: > Signed-off-by: Elijah Newren > --- > bisect.h | 2 ++ > pack-objects.h | 1 + > 2 files changed, 3 insertions(+) Do you have more context about why these are in a separate commit? For pack-objects.h, I think you might be making a fix to the cc/delta-islands

Re: [PATCHv3 5/6] compat/precompose_utf8.h: use more common include guard style

2018-08-14 Thread Jonathan Nieder
Elijah Newren wrote: > Signed-off-by: Elijah Newren > --- > compat/precompose_utf8.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Jonathan Nieder The more unusual style is less likely to be recognized by compilers, so we can waste some I/O re-reading the header at

Re: [PATCHv3 4/6] urlmatch.h: fix include guard

2018-08-14 Thread Jonathan Nieder
Elijah Newren wrote: > Signed-off-by: Elijah Newren > --- > urlmatch.h | 2 ++ > 1 file changed, 2 insertions(+) Reviewed-by: Jonathan Nieder This has two benefits: - avoids the definitions in this header from being evaluated twice - many compilers recognize the #include guard idiom and

Re: [PATCHv3 3/6] Move definition of enum branch_track from cache.h to branch.h

2018-08-14 Thread Jonathan Nieder
Elijah Newren wrote: > 'branch_track' feels more closely related to branching, and it is > needed later in branch.h; rather than #include'ing cache.h in branch.h > for this small enum, just move the enum and the external declaration > for git_branch_track to branch.h. > > Signed-off-by: Elijah

Re: [PATCHv3 2/6] alloc: make allocate_alloc_state and clear_alloc_state more consistent

2018-08-14 Thread Jonathan Nieder
Elijah Newren wrote: > Since both functions are using the same data type, they should either both > refer to it as void *, or both use the real type (struct alloc_state *). > Opt for the latter. > > Signed-off-by: Elijah Newren > --- > alloc.c | 2 +- > alloc.h | 2 +- > 2 files changed, 2

Re: [PATCHv3 1/6] Add missing includes and forward declares

2018-08-14 Thread Jonathan Nieder
Elijah Newren wrote: > Subject: Add missing includes and forward declares nit: s/declares/declarations/ This is a huge patch. Was it autogenerated or generated manually? Can the commit message say something about methodology? Is there an easy way to review it? (Keep in mind that I'm super

Re: [PATCH 0/9] Add missing includes and forward declares

2018-08-14 Thread Jonathan Nieder
Jeff King wrote: > Subject: [PATCH] test-tool.h: include git-compat-util.h > > The test-tool programs include "test-tool.h" as their first > include, which breaks our CodingGuideline of "the first > include must be git-compat-util.h or an equivalent". This > isn't actually a problem, as

Re: [PATCH 0/9] Add missing includes and forward declares

2018-08-14 Thread Jonathan Nieder
Jeff King wrote: > On Mon, Aug 13, 2018 at 11:24:37AM -0700, Junio C Hamano wrote: >> Jeff King wrote: >>> So I think the better test is a two-line .c file with: >>> >>> #include "git-compat-util.h" >>> #include $header_to_check >> >> But until that tightening happens, I do not actually mind

Re: [PATCH 0/9] Add missing includes and forward declares

2018-08-14 Thread Jeff King
On Mon, Aug 13, 2018 at 11:24:37AM -0700, Junio C Hamano wrote: > As things are slowly moving out of the so-far kitchen-sink "cache.h" > into more specific subsystem headers (like object-store.h), we may > actually want to tighten the "header that includes it first" part a > bit in the future, so

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 04:55:34PM -0700, Matthew DeVore wrote: > > - it's expensive to compute, because you have to actually walk all of > > the possible commits and trees that could refer to it. This > > prohibits a lot of other optimizations like reachability bitmaps > > (though

Re: [PATCH 1/2] store submodule in common dir

2018-08-14 Thread Jonathan Nieder
Junio C Hamano wrote: > Theoretically we should be able to make modules/kernel%2fv2.[24] > additional "worktree"s of modules/kernel%2fv2.6, but given that > these are all "bare" repositories without an attached working tree, > I am not sure how that would supposed to work. Thinking about >

[PATCH v5 6/6] list-objects-filter: implement filter tree:0

2018-08-14 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

[PATCH v5 3/6] list-objects: always parse trees gently

2018-08-14 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

[PATCH v5 4/6] rev-list: handle missing tree objects properly

2018-08-14 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 ---

[PATCH v5 0/6] filter: support for excluding all trees and blobs

2018-08-14 Thread Matthew DeVore
Please take a look. I believe I have applied or responded to all suggestions since the last iteration. Matthew DeVore (6): list-objects: store common func args in struct list-objects: refactor to process_tree_contents list-objects: always parse trees gently rev-list: handle missing tree

[PATCH v5 1/6] list-objects: store common func args in struct

2018-08-14 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

[PATCH v5 2/6] list-objects: refactor to process_tree_contents

2018-08-14 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:

[PATCH v5 5/6] revision: mark non-user-given objects instead

2018-08-14 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

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-14 Thread Matthew DeVore
On Tue, Aug 14, 2018 at 1:01 PM Jeff King wrote: > > On Tue, Aug 14, 2018 at 10:28:13AM -0700, Matthew DeVore wrote: > > > The name "tree:0" allows later filtering based on depth, i.e. "tree:1" > > would filter out all but the root tree and blobs. In order to avoid > > confusion between 0 and

Re: [PATCH 1/2] store submodule in common dir

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 4:20 PM Junio C Hamano wrote: > > Junio C Hamano writes: > > > My understanding of what Joakim wants to do is to have a top-level > > project that has three subdirectories, e.g. kernel/v2.2, kernel/v2.4 > > and kernel/v2.6, each of which is a submodule that houses these >

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-14 Thread Matthew DeVore
On Tue, Aug 14, 2018 at 1:55 PM Junio C Hamano wrote: > > Jonathan Tan writes: > > >> - grep -E "tree|blob" objs >trees_and_blobs && > >> - test_line_count = 1 trees_and_blobs > >> + grep -E "tree|blob" objs \ > >> + | awk -f print_1.awk >trees_and_blobs && > >> + git -C r1 rev-parse HEAD:

Re: [PATCH 1/2] store submodule in common dir

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 4:04 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > Signed-off-by: Stefan Beller > > --- > > path.c | 1 + > > 1 file changed, 1 insertion(+) > > > > On Tue, Aug 14, 2018 at 3:27 PM Joakim Tjernlund > > wrote: > >> > >> I am trying to create 3 submodules

Re: [PATCH 1/2] store submodule in common dir

2018-08-14 Thread Junio C Hamano
Junio C Hamano writes: > My understanding of what Joakim wants to do is to have a top-level > project that has three subdirectories, e.g. kernel/v2.2, kernel/v2.4 > and kernel/v2.6, each of which is a submodule that houses these > versions of Linux kernel source, but only clone Linus's

Re: [PATCH] partial-clone: render design doc using asciidoc

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 4:12 PM Jonathan Nieder wrote: > > Hi, > > Stefan Beller wrote: > > On Tue, Aug 14, 2018 at 3:28 PM Jonathan Nieder wrote: > > >> repack in GC has been updated to not touch promisor > >> packfiles at all, and to only repack other objects. > > > > We'd need to adapt this

Re: [PATCH v4 4/6] rev-list: handle missing tree objects properly

2018-08-14 Thread Jonathan Tan
> > So we don't want to die in list-objects.c. If we > > fail to fetch, then we will die on line 213 in rev-list.c. > > Why don't we want to die in list-objects.c? When --missing=error is > passed, fetch_if_missing retains its default value of 1, so > parse_tree_gently() will attempt to fetch it

Re: [PATCH] partial-clone: render design doc using asciidoc

2018-08-14 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > On Tue, Aug 14, 2018 at 3:28 PM Jonathan Nieder wrote: >> repack in GC has been updated to not touch promisor >> packfiles at all, and to only repack other objects. > > We'd need to adapt this documentation in Jonathans series? Yes, or in a separate patch. >> -[0]

Re: git submodule: 3 modules same git repo?

2018-08-14 Thread Jonathan Nieder
Hi, Joakim Tjernlund wrote: > I am trying to create 3 submodules from the same git repo, each pointing to a > different branch. > Since the repo is somewhat large, I don't want the 3 submodules to clone the > same repo 3 > times, I want one clone and then have the 3 submodules to point to

Re: [PATCH 1/2] store submodule in common dir

2018-08-14 Thread Junio C Hamano
Stefan Beller writes: > Signed-off-by: Stefan Beller > --- > path.c | 1 + > 1 file changed, 1 insertion(+) > > On Tue, Aug 14, 2018 at 3:27 PM Joakim Tjernlund > wrote: >> >> I am trying to create 3 submodules from the same git repo, each pointing to >> a different branch. >> Since the

Re: [PATCH] partial-clone: render design doc using asciidoc

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 3:28 PM Jonathan Nieder wrote: > > Rendered documentation can be easier to read than raw text because > headings and emphasized phrases stand out. Add the missing markup and > Makefile rule required to render this design document using asciidoc. > > Tested by running > >

Re: [PATCH v4 4/6] rev-list: handle missing tree objects properly

2018-08-14 Thread Jonathan Tan
> > > @@ -373,6 +375,7 @@ int cmd_rev_list(int argc, const char **argv, const > > > char *prefix) > > > init_revisions(, prefix); > > > revs.abbrev = DEFAULT_ABBREV; > > > revs.commit_format = CMIT_FMT_UNSPECIFIED; > > > + revs.do_not_die_on_missing_tree = 1; > > > > Is this

Re: [PATCH v4 4/6] rev-list: handle missing tree objects properly

2018-08-14 Thread Matthew DeVore
On Tue, Aug 14, 2018 at 11:06 AM Jonathan Tan wrote: > > > Previously, we assumed only blob objects could be missing. This patch > > makes rev-list handle missing trees like missing blobs. A missing tree > > will cause an error if --missing indicates an error should be caused, > > and the hash is

[PATCH 1/2] store submodule in common dir

2018-08-14 Thread Stefan Beller
Signed-off-by: Stefan Beller --- path.c | 1 + 1 file changed, 1 insertion(+) On Tue, Aug 14, 2018 at 3:27 PM Joakim Tjernlund wrote: > > I am trying to create 3 submodules from the same git repo, each pointing to a > different branch. > Since the repo is somewhat large, I don't want the 3

Re: t5570-git-daemon fails with SIGPIPE on OSX

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 06:32:47PM -0400, Jeff King wrote: > I suspect the (largely untested) patch below would make your test > problems go away. Or instead, we could simply add sigpipe=ok to the > test_must_fail invocation, but I agree with you that the current > behavior on OS X is not ideal

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 2:12 PM Jonathan Nieder wrote: > > Hi, > > Stefan Beller wrote: > > On Tue, Aug 14, 2018 at 11:57 AM Jonathan Nieder wrote: > > >> Second, what if we store the pathname in config? We already store the > >> URL there: > >> > >> [submodule "plugins/hooks"] > >>

Re: t5570-git-daemon fails with SIGPIPE on OSX

2018-08-14 Thread Jeff King
On Mon, Aug 06, 2018 at 05:11:13PM +0200, SZEDER Gábor wrote: > - 'git upload-pack' receives the request, parses the want line, > notices the corrupt pack, responds with an 'ERR upload-pack: not > our ref' pkt-line, and die()s right away. > > - 'git fetch' finally approaches the end

[PATCH] partial-clone: render design doc using asciidoc

2018-08-14 Thread Jonathan Nieder
Rendered documentation can be easier to read than raw text because headings and emphasized phrases stand out. Add the missing markup and Makefile rule required to render this design document using asciidoc. Tested by running make -C Documentation technical/partial-clone.html and viewing the

git submodule: 3 modules same git repo?

2018-08-14 Thread Joakim Tjernlund
I am trying to create 3 submodules from the same git repo, each pointing to a different branch. Since the repo is somewhat large, I don't want the 3 submodules to clone the same repo 3 times, I want one clone and then have the 3 submodules to point to different commits. Is this possible? If

Re: Syncing HEAD

2018-08-14 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 14 2018, Christian Couder wrote: > Hi, > > When cloning with --mirror, the clone gets its HEAD initialized with > the value HEAD has in its origin remote. After that if HEAD changes in > origin there is no simple way to sync HEAD at the same time as the > refs are synced. > > It

Re: [PATCH] t5310-pack-bitmaps: fix bogus 'pack-objects to file can use bitmap' test

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 01:47:21PM +0200, SZEDER Gábor wrote: > The test 'pack-objects to file can use bitmap' added in 645c432d61 > (pack-objects: use reachability bitmap index when generating > non-stdout pack, 2016-09-10) is silently buggy and doesn't check what > it's supposed to. > > In

Re: Syncing HEAD

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 05:06:16PM -0400, Jeff King wrote: > On Tue, Aug 14, 2018 at 10:09:37PM +0200, Christian Couder wrote: > > > When cloning with --mirror, the clone gets its HEAD initialized with > > the value HEAD has in its origin remote. After that if HEAD changes in > > origin there is

Re: [PATCH] submodule: add more exhaustive up-path testing

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 2:16 PM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, Aug 14 2018, Stefan Beller wrote: > > > On Tue, Aug 14, 2018 at 2:05 PM Ævar Arnfjörð Bjarmason > > wrote: > > > >> > So ideally we'd also error out as soon as the host name is touched? > >> > >> Do we have some utility

Re: [PATCH 0/7] Resend of sb/submodule-update-in-c

2018-08-14 Thread Stefan Beller
gist On Tue, Aug 14, 2018 at 2:01 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > Thanks Brandon for pointing out to use repo_git_path instead of > > manually constructing the path. > > > > That is the only change in this resend. > > Rcpt. Hopefully this is now ready for 'next'? I

Re: [PATCH] submodule: add more exhaustive up-path testing

2018-08-14 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 14 2018, Stefan Beller wrote: > On Tue, Aug 14, 2018 at 2:05 PM Ævar Arnfjörð Bjarmason > wrote: > >> > So ideally we'd also error out as soon as the host name is touched? >> >> Do we have some utility function that'll take whatever we have in >> remote..url and spew out the

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-14 Thread Jonathan Nieder
Hi, Stefan Beller wrote: > On Tue, Aug 14, 2018 at 11:57 AM Jonathan Nieder wrote: >> Second, what if we store the pathname in config? We already store the >> URL there: >> >> [submodule "plugins/hooks"] >> url = https://gerrit.googlesource.com/plugins/hooks >> >> So we

Re: [PATCH] submodule: add more exhaustive up-path testing

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 2:05 PM Ævar Arnfjörð Bjarmason wrote: > > So ideally we'd also error out as soon as the host name is touched? > > Do we have some utility function that'll take whatever we have in > remote..url and spew out the username / host / path? We must, > since the clone protocol

Re: Syncing HEAD

2018-08-14 Thread Brandon Williams
On 08/14, Stefan Beller wrote: > On Tue, Aug 14, 2018 at 1:09 PM Christian Couder > wrote: > > > > Hi, > > > > When cloning with --mirror, the clone gets its HEAD initialized with > > the value HEAD has in its origin remote. After that if HEAD changes in > > origin there is no simple way to sync

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 11:57 AM Jonathan Nieder wrote: > > Hi, > > Brandon Williams wrote: > > On 08/09, Jeff King wrote: > > >> One interesting thing about url-encoding is that it's not one-to-one. > >> This case could also be %2F, which is a different file (on a > >> case-sensitive

Re: Syncing HEAD

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 10:09:37PM +0200, Christian Couder wrote: > When cloning with --mirror, the clone gets its HEAD initialized with > the value HEAD has in its origin remote. After that if HEAD changes in > origin there is no simple way to sync HEAD at the same time as the > refs are synced.

Re: [PATCH] submodule: add more exhaustive up-path testing

2018-08-14 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 14 2018, Stefan Beller wrote: > On Tue, Aug 14, 2018 at 11:59 AM Ævar Arnfjörð Bjarmason > wrote: >> >> The tests added in 63e95beb08 ("submodule: port resolve_relative_url >> from shell to C", 2016-04-15) didn't do a good job of testing various >> up-path invocations where the

Re: [PATCH v2] send-email: add an option to impose delay sent E-Mails

2018-08-14 Thread Ævar Arnfjörð Bjarmason
On Tue, Aug 14 2018, Eric Wong wrote: > Ævar Arnfjörð Bjarmason wrote: >> Add a --send-delay option with a corresponding sendemail.smtpSendDelay >> configuration variable. When set to e.g. 2, this causes send-email to >> sleep 2 seconds before sending the next E-Mail. We'll only sleep >>

Re: [PATCH 0/7] Resend of sb/submodule-update-in-c

2018-08-14 Thread Junio C Hamano
Stefan Beller writes: > Thanks Brandon for pointing out to use repo_git_path instead of > manually constructing the path. > > That is the only change in this resend. Rcpt. Hopefully this is now ready for 'next'?

Re: Contributor Summit planning

2018-08-14 Thread Junio C Hamano
Jeff King writes: > One problem there is that the prefixes are ambiguous (e.g., Jacob Keller > shares with me, and I think at least one other over the years). You > could look at the author of the tip commit, but that's not always right > (and in fact, counting just merged topics misses

Re: Syncing HEAD

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 1:09 PM Christian Couder wrote: > > Hi, > > When cloning with --mirror, the clone gets its HEAD initialized with > the value HEAD has in its origin remote. After that if HEAD changes in > origin there is no simple way to sync HEAD at the same time as the > refs are synced.

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-14 Thread Junio C Hamano
Jonathan Tan writes: >> - grep -E "tree|blob" objs >trees_and_blobs && >> - test_line_count = 1 trees_and_blobs >> + grep -E "tree|blob" objs \ >> + | awk -f print_1.awk >trees_and_blobs && >> + git -C r1 rev-parse HEAD: >expected && >> + test_cmp trees_and_blobs expected > > Indent "| awk" (and

Re: [PATCH v4 2/5] unpack-trees: add performance tracing

2018-08-14 Thread Junio C Hamano
Duy Nguyen writes: > These trace messages are made for human consumption. Granted > occasionally we need some processing but I find one liners mostly > suffice. Now we turn these into something made for machines, turning > people to second citizens. I've read these messages reformatted for >

Re: Measuring Community Involvement (was Re: Contributor Summit planning)

2018-08-14 Thread Junio C Hamano
Jeff King writes: > On Tue, Aug 14, 2018 at 01:43:38PM -0400, Derrick Stolee wrote: > >> On 8/13/2018 5:54 PM, Jeff King wrote: >> > So I try not to think too hard on metrics, and just use them to get a >> > rough view on who is active. >> >> I've been very interested in measuring community

Re: [PATCH v3 7/7] submodule: support reading .gitmodules even when it's not checked out

2018-08-14 Thread Junio C Hamano
Antonio Ospite writes: > /* Equivalent to ACTION_SET in builtin/config.c */ > - if (argc == 3) > + if (argc == 3) { > + struct object_id oid; > + > + /* > + * If the .gitmodules file is not in the working tree but it > + * is in the

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-14 Thread Jonathan Tan
> - grep -E "tree|blob" objs >trees_and_blobs && > - test_line_count = 1 trees_and_blobs > + grep -E "tree|blob" objs \ > + | awk -f print_1.awk >trees_and_blobs && > + git -C r1 rev-parse HEAD: >expected && > + test_cmp trees_and_blobs expected Indent "| awk" (and similar lines in this patch) -

Re: [PATCH v3 3/7] t7411: be nicer to future tests and really clean things up

2018-08-14 Thread Junio C Hamano
Antonio Ospite writes: > test_expect_success 'error message contains blob reference' ' > + # Remove the error introduced in the previous test. > + # It is not needed in the following tests. > + test_when_finished "git -C super reset --hard HEAD^" && > (cd super && >

Re: [PATCH v4 2/5] unpack-trees: add performance tracing

2018-08-14 Thread Jeff Hostetler
On 8/14/2018 2:44 PM, Stefan Beller wrote: On Tue, Aug 14, 2018 at 11:32 AM Duy Nguyen wrote: On Tue, Aug 14, 2018 at 8:19 PM Jeff Hostetler wrote: I'm looking at adding code to my SLOG (better name suggestions welcome) patch series to eventually replace the existing git_trace facility.

Syncing HEAD

2018-08-14 Thread Christian Couder
Hi, When cloning with --mirror, the clone gets its HEAD initialized with the value HEAD has in its origin remote. After that if HEAD changes in origin there is no simple way to sync HEAD at the same time as the refs are synced. It looks like the simplest way to sync HEAD is: 1) git remote show

Re: Measuring Community Involvement (was Re: Contributor Summit planning)

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 12:47:59PM -0700, Stefan Beller wrote: > On Tue, Aug 14, 2018 at 12:36 PM Jeff King wrote: > > > Thanks, it was nice to see a more comprehensive list in one spot. > > > > It would be neat to have a tool that presents all of these > > automatically, but I think the email

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 10:28:13AM -0700, Matthew DeVore wrote: > The name "tree:0" allows later filtering based on depth, i.e. "tree:1" > would filter out all but the root tree and blobs. In order to avoid > confusion between 0 and capital O, the documentation was worded in a > somewhat

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-14 Thread Matthew DeVore
On Tue, Aug 14, 2018 at 11:18 AM Jonathan Tan wrote: > > > @@ -743,6 +743,9 @@ specification contained in . > > A debug option to help with future "partial clone" development. > > This option specifies how missing objects are handled. > > + > > +The form '--filter=tree:' omits all

Re: [PATCH v4 2/5] unpack-trees: add performance tracing

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 08:51:41PM +0200, Duy Nguyen wrote: > > But AFAICT these series are all about putting the sampling points into the > > code base, so formatting would be orthogonal to it? > > It's not just sampling points. There's things like index id being > shown in the message for

Re: [PATCH] submodule: add more exhaustive up-path testing

2018-08-14 Thread Junio C Hamano
Stefan Beller writes: > Thanks for this patch! > Stefan Thanks, I'd take it as your Acked-by: (please holler if it isn't before the patch hits 'next').

Re: [PATCH v2] send-email: add an option to impose delay sent E-Mails

2018-08-14 Thread Junio C Hamano
Eric Wong writes: >> Some popular E-Mail clients completely ignore the "Date" header, which >> format-patch is careful to set such that the patches will be displayed >> in order, and instead sort by the time the E-mail was received. It is send-email that carefully shows monotonically increasing

Re: Measuring Community Involvement (was Re: Contributor Summit planning)

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 12:36 PM Jeff King wrote: > Thanks, it was nice to see a more comprehensive list in one spot. > > It would be neat to have a tool that presents all of these > automatically, but I think the email ones are pretty tricky (most people > don't have the whole list archive

Re: [PATCH 3/4] cat-file: use a single strbuf for all output

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 09:30:57PM +0200, René Scharfe wrote: > > -static void batch_object_write(const char *obj_name, struct batch_options > > *opt, > > +static void batch_object_write(const char *obj_name, > > + struct strbuf *scratch, > > +

Re: Measuring Community Involvement (was Re: Contributor Summit planning)

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 01:43:38PM -0400, Derrick Stolee wrote: > On 8/13/2018 5:54 PM, Jeff King wrote: > > So I try not to think too hard on metrics, and just use them to get a > > rough view on who is active. > > I've been very interested in measuring community involvement, with the >

Re: [PATCH 3/4] cat-file: use a single strbuf for all output

2018-08-14 Thread René Scharfe
Am 14.08.2018 um 20:20 schrieb Jeff King: > When we're in batch mode, we end up in batch_object_write() > for each object, which allocates its own strbuf for each > call. Instead, we can provide a single "scratch" buffer that > gets reused for each output. When running: > > git cat-file

Re: [PATCH v4 0/5] Speed up unpack_trees()

2018-08-14 Thread Ben Peart
On 8/12/2018 4:15 AM, Nguyễn Thái Ngọc Duy wrote: v4 has a bunch of changes - 1/5 is a new one to show indented tracing. This way it's less misleading to read nested time measurements - 3/5 now has the switch/restore cache_bottom logic. Junio suggested a check instead in his final

Re: [PATCH] mingw: enable atomic O_APPEND

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 08:29:04PM +0200, Johannes Sixt wrote: > Am 14.08.2018 um 00:37 schrieb Jeff King: > > And then you can do something like: > > > >for size in 4097 8193 16385 32769 65537 131073 262145 524289 1048577; do > > >out ;# clean up from last run > > echo "Trying

Re: [PATCH] submodule: add more exhaustive up-path testing

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 11:59 AM Ævar Arnfjörð Bjarmason wrote: > > The tests added in 63e95beb08 ("submodule: port resolve_relative_url > from shell to C", 2016-04-15) didn't do a good job of testing various > up-path invocations where the up-path would bring us beyond even the > URL in question

Re: [PATCH 4/4] range-diff: indent special lines as context

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 11:54 AM Johannes Schindelin wrote: > > Hi Stefan, > > On Mon, 13 Aug 2018, Stefan Beller wrote: > > > > > The later lines that indicate a change to the Makefile will be treated > > > > as > > > > context both in the outer and inner diff, such that those lines stay > > >

[PATCH] submodule: add more exhaustive up-path testing

2018-08-14 Thread Ævar Arnfjörð Bjarmason
The tests added in 63e95beb08 ("submodule: port resolve_relative_url from shell to C", 2016-04-15) didn't do a good job of testing various up-path invocations where the up-path would bring us beyond even the URL in question without emitting an error. These results look nonsensical, but it's worth

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-14 Thread Jeff King
On Tue, Aug 14, 2018 at 11:04:06AM -0700, Brandon Williams wrote: > > I think this backwards-compatibility is necessary to avoid pain. But > > until it goes away, I don't think this is helping the vulnerability from > > 0383bbb901. Because there the issue was that the submodule name pointed > >

Re: [PATCH 2/2] submodule: munge paths to submodule git directories

2018-08-14 Thread Jonathan Nieder
Hi, Brandon Williams wrote: > On 08/09, Jeff King wrote: >> One interesting thing about url-encoding is that it's not one-to-one. >> This case could also be %2F, which is a different file (on a >> case-sensitive filesystem). I think "%20" and "+" are similarly >> interchangeable. >> >> If we

Re: [PATCH 4/4] range-diff: indent special lines as context

2018-08-14 Thread Johannes Schindelin
Hi Stefan, On Mon, 13 Aug 2018, Stefan Beller wrote: > > > The later lines that indicate a change to the Makefile will be treated as > > > context both in the outer and inner diff, such that those lines stay > > > regular color. > > > > While I am a fan of having those lines colored correctly, I

Re: [PATCH v4 2/5] unpack-trees: add performance tracing

2018-08-14 Thread Duy Nguyen
On Tue, Aug 14, 2018 at 8:44 PM Stefan Beller wrote: > > On Tue, Aug 14, 2018 at 11:32 AM Duy Nguyen wrote: > > > > On Tue, Aug 14, 2018 at 8:19 PM Jeff Hostetler > > wrote: > > > I'm looking at adding code to my SLOG (better name suggestions welcome) > > > patch series to eventually replace

Re: [PATCH v2] send-email: add an option to impose delay sent E-Mails

2018-08-14 Thread Eric Wong
Ævar Arnfjörð Bjarmason wrote: > Add a --send-delay option with a corresponding sendemail.smtpSendDelay > configuration variable. When set to e.g. 2, this causes send-email to > sleep 2 seconds before sending the next E-Mail. We'll only sleep > between sends, not before the first send, or after

Re: [PATCH v4 2/5] unpack-trees: add performance tracing

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 11:32 AM Duy Nguyen wrote: > > On Tue, Aug 14, 2018 at 8:19 PM Jeff Hostetler wrote: > > I'm looking at adding code to my SLOG (better name suggestions welcome) > > patch series to eventually replace the existing git_trace facility. > > Complement maybe. Replace, please

Re: [PATCH v2] send-email: add an option to impose delay sent E-Mails

2018-08-14 Thread Stefan Beller
On Tue, Aug 14, 2018 at 11:15 AM Ævar Arnfjörð Bjarmason wrote: > > Add a --send-delay option with a corresponding sendemail.smtpSendDelay > configuration variable. When set to e.g. 2, this causes send-email to > sleep 2 seconds before sending the next E-Mail. We'll only sleep > between sends,

Re: [PATCH v4 2/5] unpack-trees: add performance tracing

2018-08-14 Thread Duy Nguyen
On Tue, Aug 14, 2018 at 8:19 PM Jeff Hostetler wrote: > I'm looking at adding code to my SLOG (better name suggestions welcome) > patch series to eventually replace the existing git_trace facility. Complement maybe. Replace, please no. I'd rather not stare at json messages. -- Duy

Re: [PATCH] mingw: enable atomic O_APPEND

2018-08-14 Thread Johannes Sixt
Am 14.08.2018 um 00:37 schrieb Jeff King: And then you can do something like: for size in 4097 8193 16385 32769 65537 131073 262145 524289 1048577; do >out ;# clean up from last run echo "Trying $size..." timeout 5 ./write $size out if ! ./check $size I used your

Re: [PATCH] git-submodule.sh: accept verbose flag in cmd_update to be non-quiet

2018-08-14 Thread Jonathan Nieder
Stefan Beller wrote: > git-submodule.sh | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/git-submodule.sh b/git-submodule.sh > index 8b5ad59bdee..f7fd80345cd 100755 > --- a/git-submodule.sh > +++ b/git-submodule.sh > @@ -438,6 +438,9 @@ cmd_update() > -q|--quiet) >

[PATCH] git-submodule.sh: accept verbose flag in cmd_update to be non-quiet

2018-08-14 Thread Stefan Beller
In a56771a668d (builtin/pull: respect verbosity settings in submodules, 2018-01-25), we made sure to pass on both quiet and verbose flag from builtin/pull.c to the submodule shell script. However git-submodule doesn't understand a verbose flag, which results in a bug when invoking git pull

[PATCH 4/4] for_each_*_object: move declarations to object-store.h

2018-08-14 Thread Jeff King
The for_each_loose_object() and for_each_packed_object() functions are meant to be part of a unified interface: they use the same set of for_each_object_flags, and it's not inconceivable that we might one day add a single for_each_object() wrapper around them. Let's put them together in a single

[PATCH 3/4] cat-file: use a single strbuf for all output

2018-08-14 Thread Jeff King
When we're in batch mode, we end up in batch_object_write() for each object, which allocates its own strbuf for each call. Instead, we can provide a single "scratch" buffer that gets reused for each output. When running: git cat-file --batch-all-objects --batch-check='%(objectname)' on

Re: [PATCH v4 2/5] unpack-trees: add performance tracing

2018-08-14 Thread Jeff Hostetler
On 8/13/2018 6:41 PM, Junio C Hamano wrote: Jeff King writes: I can buy the argument that it's nice to have some form of profiling that works everywhere, even if it's lowest-common-denominator. I just wonder if we could be investing effort into tooling around existing solutions that will

Re: [PATCH v4 6/6] list-objects-filter: implement filter tree:0

2018-08-14 Thread Jonathan Tan
> @@ -743,6 +743,9 @@ specification contained in . > A debug option to help with future "partial clone" development. > This option specifies how missing objects are handled. > + > +The form '--filter=tree:' omits all blobs and trees deeper than > + from the root tree. Currently, only

[PATCH 2/4] cat-file: split batch "buf" into two variables

2018-08-14 Thread Jeff King
We use the "buf" strbuf for two things: to read incoming lines, and as a scratch space for test-expanding the user-provided format. Let's split this into two variables with descriptive names, which makes their purpose and lifetime more clear. It will also help in a future patch when we start

[PATCH v2] send-email: add an option to impose delay sent E-Mails

2018-08-14 Thread Ævar Arnfjörð Bjarmason
Add a --send-delay option with a corresponding sendemail.smtpSendDelay configuration variable. When set to e.g. 2, this causes send-email to sleep 2 seconds before sending the next E-Mail. We'll only sleep between sends, not before the first send, or after the last. This option has two uses.

[PATCH 1/4] cat-file: use oidset check-and-insert

2018-08-14 Thread Jeff King
We don't need to check if the oidset has our object before we insert it; that's done as part of the insertion. We can just rely on the return value from oidset_insert(), which saves one hash lookup per object. This measurable speedup is tiny and within the run-to-run noise, but the result is

[PATCH 0/4] finishing touches on jk/for-each-object-iteration

2018-08-14 Thread Jeff King
On Mon, Aug 13, 2018 at 11:45:06AM -0700, Jonathan Tan wrote: > > [1/7]: for_each_*_object: store flag definitions in a single location > > [2/7]: for_each_*_object: take flag arguments as enum > > [3/7]: for_each_*_object: give more comprehensive docstrings > > [4/7]:

Re: [PATCH v3 5/5] list-objects-filter: implement filter tree:0

2018-08-14 Thread Matthew DeVore
On Tue, Aug 14, 2018 at 8:13 AM Jeff Hostetler wrote: > > > > On 8/13/2018 2:14 PM, Matthew DeVore wrote: > > 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

  1   2   >