Re: We should add a "git gc --auto" after "git clone" due to commit graph

2018-10-03 Thread Stefan Beller
> So we wouldn't be spending 5 minutes repacking linux.git right after > cloning it, just ~10s generating the commit graph, and the same would > happen if you rm'd .git/objects/info/commit-graph and ran "git commit", > which would kick of "gc --auto" in the background and do the same thing. Or

Re: [PATCH 1/2] commit-graph: clean up leaked memory during write

2018-10-02 Thread Stefan Beller
> > My preference is to avoid them in the name of simplicity. If you're > using "make SANITIZE=leak test" to check for leaks, it will skip these > cases. If you're using valgrind, I think these may be reported as > "reachable". But that number already isn't useful for finding real > leaks, because

Re: [PATCH 1/1] protocol: limit max protocol version per service

2018-10-02 Thread Stefan Beller
On Tue, Oct 2, 2018 at 3:00 PM Josh Steadmon wrote: > > For services other than git-receive-pack, clients currently advertise > that they support the version set in the protocol.version config, > regardless of whether or not there is actually an implementation of that > service for the given

Re: [PATCH 1/2] commit-graph: clean up leaked memory during write

2018-10-02 Thread Stefan Beller
On Tue, Oct 2, 2018 at 12:09 PM Martin Ågren wrote: > > On Tue, 2 Oct 2018 at 19:59, Stefan Beller wrote: > > > > + > > > > + string_list_clear(, 0); > > > > } > > > > > > Nit: The blank line adds some asymmetr

Re: [PATCH 5/5] diff --color-moved: fix a memory leak

2018-10-02 Thread Stefan Beller
On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood wrote: > > From: Phillip Wood > > Free the hashmap items as well as the hashmap itself. This was found > with asan. > > Signed-off-by: Phillip Wood > --- > diff.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/diff.c

Re: [PATCH 4/5] diff --color-moved-ws: fix another memory leak

2018-10-02 Thread Stefan Beller
On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood wrote: > > From: Phillip Wood > > This is obvious in retrospect, it was found with asan. Indeed. :/ Thanks, Stefan

Re: [PATCH 3/5] diff --color-moved-ws: fix a memory leak

2018-10-02 Thread Stefan Beller
On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood wrote: > > From: Phillip Wood > > Don't duplicate the indentation string if we're not going to use it. > This was found with asan. Makes sense, Thanks, Stefan With compute_ws_delta growing bigger here (and having only one caller), I wonder if we

Re: [PATCH 2/5] diff --color-moved-ws: fix out of bounds string access

2018-10-02 Thread Stefan Beller
On Tue, Oct 2, 2018 at 10:55 AM Phillip Wood wrote: > > From: Phillip Wood > > When adjusting the start of the string to take account of the change > in indentation the code was not checking that the string being > adjusted was in fact longer than the indentation change. This was > detected by

Re: [PATCH 1/5] diff --color-moved-ws: fix double free crash

2018-10-02 Thread Stefan Beller
; if (got_match[i]) { > /* Carry the white space delta forward */ I would think this comment is obsolete as well with this patch? With or without that nit addressed, this patch is Reviewed-by: Stefan Beller

Re: [PATCH 1/2] commit-graph: clean up leaked memory during write

2018-10-02 Thread Stefan Beller
On Tue, Oct 2, 2018 at 8:40 AM Martin Ågren wrote: > > On Tue, 2 Oct 2018 at 17:01, Derrick Stolee via GitGitGadget > wrote: > > diff --git a/commit-graph.c b/commit-graph.c > > index 2a24eb8b5a..7226bd6b58 100644 > > --- a/commit-graph.c > > +++ b/commit-graph.c > > @@ -698,6 +698,8 @@ void

[PATCH] submodule update --remote: introduce pinning

2018-10-01 Thread Stefan Beller
when encountering a submodule with no branch. Step 3: when neither --default-to-master nor --no-default-to-master has been passed, warn when encountering a submodule with no branch and treat it as pinned. Step 4: eliminate the warning. This implements step 0 and 1. Signed-off-by: Stefan Beller ---

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

2018-10-01 Thread Stefan Beller
On Mon, Oct 1, 2018 at 8:45 AM Antonio Ospite wrote: > > On Thu, 27 Sep 2018 11:00:52 -0700 > Stefan Beller wrote: > > > On Thu, Sep 27, 2018 at 7:44 AM Antonio Ospite wrote: > [...] > > > OK, so the plan for v6 is: > > > > > > - avoid th

Re: [PATCH] grep: provide a noop --recursive option

2018-10-01 Thread Stefan Beller
On Sat, Sep 29, 2018 at 7:55 AM Ævar Arnfjörð Bjarmason wrote: > > This --recursive (-r) option does nothing, and is purely here to > appease people who have "grep -r ..." burned into their muscle memory. > > Requested-by: Christoph Berg > Signed-off-by: Ævar Arnfjörð Bjarmason > --- > > On

Re: [BUG] Segfault in "git submodule"

2018-10-01 Thread Stefan Beller
On Sat, Sep 29, 2018 at 9:43 AM Raymond Jennings wrote: > > I have a repo, but it appears to be specific to staging area state. > It only segfaults when I have a certain file deleted. > > Where do you want me to upload it? > On Sat, Sep 29, 2018 at 8:34 AM Duy Nguyen wrote: > > > > On Sat, Sep

Re: [PATCH] strbuf.h: format according to coding guidelines

2018-09-28 Thread Stefan Beller
On Fri, Sep 28, 2018 at 2:42 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > The previous patch suggested the strbuf header to be the leading example > > of how we would want our APIs to be documented. This may lead to some > > scrutiny of that code

Re: [PATCH] FYI / RFC: submodules: introduce repo-like workflow

2018-09-28 Thread Stefan Beller
On Fri, Sep 28, 2018 at 12:26 PM Ævar Arnfjörð Bjarmason wrote: > > > On Thu, Sep 27 2018, Stefan Beller wrote: > > > Internally we have rolled out this as an experiment for > > "submodules replacing the repo tool[1]". The repo tool is described as: > > &g

[PATCH] strbuf.h: format according to coding guidelines

2018-09-28 Thread Stefan Beller
long lines Signed-off-by: Stefan Beller --- Maybe this on top of Junios guideline patch? Thanks, Stefan strbuf.h | 148 ++- 1 file changed, 81 insertions(+), 67 deletions(-) diff --git a/strbuf.h b/strbuf.h index 60a35aef16..bf18fddb5b

Re: [PATCH] Documentation/CodingGuidelines: How to document new APIs

2018-09-28 Thread Stefan Beller
On Thu, Sep 27, 2018 at 6:11 PM Jeff King wrote: > > On Thu, Sep 27, 2018 at 04:27:32PM -0700, Jonathan Nieder wrote: > > > > There are different opinions on how to document an API properly. > > > Discussion turns out nobody disagrees with documenting new APIs on the > > > function level in the

[PATCH] FYI / RFC: submodules: introduce repo-like workflow

2018-09-27 Thread Stefan Beller
"checkout -f master" in the submodule as well) clone: see checkout reset --hard: see checkout Change-Id: I69b361e5bd9d57226a0976fd36968cf9aeb52ae0 Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- Documentation/gi

Re: [RFC PATCH v2 4/4] fetch: do not list refs if fetching only hashes

2018-09-27 Thread Stefan Beller
On Thu, Sep 27, 2018 at 12:24 PM Jonathan Tan wrote: > > If only hash literals are given on a "git fetch" command-line, tag > following is not requested, and the fetch is done using protocol v2, a > list of refs is not required from the remote. Therefore, optimize by > invoking

Re: [RFC PATCH v2 2/4] transport: do not list refs if possible

2018-09-27 Thread Stefan Beller
On Thu, Sep 27, 2018 at 12:24 PM Jonathan Tan wrote: > > +test_expect_success 'when dynamically fetching missing object, do not list > refs' ' > + cat trace && leftover debug cat?

[PATCH] Documentation/CodingGuidelines: How to document new APIs

2018-09-27 Thread Stefan Beller
There are different opinions on how to document an API properly. Discussion turns out nobody disagrees with documenting new APIs on the function level in the header file and high level concepts in Documentation/technical, so let's state that in the guidelines. Signed-off-by: Stefan Beller

Re: [PATCH] submodule: Alllow staged changes for get_superproject_working_tree

2018-09-27 Thread Stefan Beller
3952e12824aa2106d560f21d 3 submodule-child-test > > The code in get_superproject_working_tree() expected exactly one entry to > be returned; this patch makes it use the first entry if multiple entries > are returned. > > Test t1500-rev-parse is extended to cover this case. > > Signed-off-by:

Re: [PATCH v2 2/4] archive: use packet_reader for communications

2018-09-27 Thread Stefan Beller
rchive". > > Signed-off-by: Josh Steadmon This patch is Reviewed-by: Stefan Beller Thanks! > --- > builtin/archive.c | 23 ++- > 1 file changed, 14 insertions(+), 9 deletions(-) > > diff --git a/builtin/archive.c b/builtin/archive.c > index e74

Re: [PATCH v2 1/4] archive: follow test standards around assertions

2018-09-27 Thread Stefan Beller
On Wed, Sep 26, 2018 at 6:25 PM Josh Steadmon wrote: > > Move assertions outside of the check_tar function so that all top-level > code is wrapped in a test_expect_* assertion. Cool, I'll file this under modernizing the test infrastructure ;-) > diff --git a/t/t5000-tar-tree.sh

Re: [PATCH v2 0/4] Add proto v2 archive command with HTTP support

2018-09-27 Thread Stefan Beller
On Wed, Sep 26, 2018 at 6:25 PM Josh Steadmon wrote: > > This is the second version of my series to add a new protocol v2 command > for archiving, with support for HTTP(S). > > NEEDSWORK: a server built with this series is not backwards-compatible > with clients that set GIT_PROTOCOL=version=2 or

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

2018-09-27 Thread Stefan Beller
On Thu, Sep 27, 2018 at 7:44 AM Antonio Ospite wrote: > > If you end up touching get_oid() please CC me. noted. I am not sure I'll touch it anytime soon, though. > > Are you suggesting to look into super-prefix for any reason in > particular? No, I misread the intent of that part of your

Re: On shipping more of our technical docs as manpages

2018-09-26 Thread Stefan Beller
On Wed, Sep 26, 2018 at 1:44 PM Ævar Arnfjörð Bjarmason wrote: > > And if we were going to generate something external, would it make more > > sense to write in a structured format like doxygen? I am not a big fan > > of it myself, but at least from there you can generate a more richly > >

Re: [PATCH] fetch: replace string-list used as a look-up table with a hashmap

2018-09-26 Thread Stefan Beller
On Wed, Sep 26, 2018 at 2:28 PM Junio C Hamano wrote: > > +struct refname_hash_entry { > + struct hashmap_entry ent; /* must be the first member */ $ git grep "struct hashmap_entry" reveals that we have another convention that we follow but not document, which is to stress the importance

Re: [PATCH 1/8] sha1-array: provide oid_array_filter

2018-09-26 Thread Stefan Beller
> > (I am not seriously proposing unbalanced comments, but for > > longer documenting comments we may want to consider, > > omitting the asterisk?) > > If this is not a serious proposal, then I'll stop wasting > everybody's time. I proposed two things, one of which I was not serious about. The

Re: [PATCH 1/8] sha1-array: provide oid_array_filter

2018-09-26 Thread Stefan Beller
> I agree on both counts. I just like to read these in plain text > while I am coding for Git (or reviewing patches coded for Git). > > The reason why I have mild preference to D/technical/ over in-header > doc is only because I find even these asterisks at the left-side-end > distracting; it is

Re: [PATCH 1/8] sha1-array: provide oid_array_filter

2018-09-26 Thread Stefan Beller
On Wed, Sep 26, 2018 at 11:58 AM Jeff King wrote: > Now I'll admit it seems like make-work to me because I would not plan to > ever look at the formatted output myself. But I guess I don't understand > the audience for this formatted output. I have been watching from the side lines so far, as I

[PATCH v4 4/9] submodule: move global changed_submodule_names into fetch submodule struct

2018-09-25 Thread Stefan Beller
The `changed_submodule_names` are only used for fetching, so let's make it part of the struct that is passed around for fetching submodules. Signed-off-by: Stefan Beller --- submodule.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff

[PATCH v4 3/9] submodule.c: sort changed_submodule_names before searching it

2018-09-25 Thread Stefan Beller
order. That makes "append then sort" more appropriate. Signed-off-by: Stefan Beller --- submodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodule.c b/submodule.c index 0de9e2800ad..22c64bd8559 100644 --- a/submodule.c +++ b/submodule.c @@ -1256

[PATCH v4 1/9] sha1-array: provide oid_array_filter

2018-09-25 Thread Stefan Beller
Helped-by: Junio C Hamano Signed-off-by: Stefan Beller --- Documentation/technical/api-oid-array.txt | 5 + sha1-array.c | 17 + sha1-array.h | 3 +++ 3 files changed, 25 insertions(+) diff --git a/Documentation

[PATCH v4 2/9] submodule.c: fix indentation

2018-09-25 Thread Stefan Beller
The submodule subsystem is really bad at staying within 80 characters. Fix it while we are here. Signed-off-by: Stefan Beller --- submodule.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/submodule.c b/submodule.c index b53cb6e9c47..0de9e2800ad 100644

[PATCH v4 5/9] submodule.c: do not copy around submodule list

2018-09-25 Thread Stefan Beller
access to the util pointer for longer that contains the commits that we need to fetch, which will be useful in a later patch. Signed-off-by: Stefan Beller --- submodule.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/submodule.c b/submodule.c index

[PATCH v4 0/9] fetch: make sure submodule oids are fetched

2018-09-25 Thread Stefan Beller
s series aims to fix. The first patches provide new basic functionality and do some refactoring; the interesting part is in the two last patches. This was discussed in https://public-inbox.org/git/20180808221752.195419-1-sbel...@google.com/ and I think I addressed all feedback so far.

[PATCH v4 6/9] repository: repo_submodule_init to take a submodule struct

2018-09-25 Thread Stefan Beller
. Signed-off-by: Stefan Beller --- builtin/grep.c | 17 ++--- builtin/ls-files.c | 12 +++- builtin/submodule--helper.c | 2 +- repository.c| 27 ++- repository.h| 11 +-- 5 files changed, 37

[PATCH v4 9/9] builtin/fetch: check for submodule updates for non branch fetches

2018-09-25 Thread Stefan Beller
s so far, not for FETCH_HEAD. Make sure that fetching a superproject to its FETCH_HEAD, also respects the existence checks for objects in the submodule recursion. Signed-off-by: Stefan Beller --- builtin/fetch.c | 5 - t/t5526-fetch-submodules.sh | 2 +- 2 files changed, 5 insertio

[PATCH v4 7/9] submodule: fetch in submodules git directory instead of in worktree

2018-09-25 Thread Stefan Beller
ady. Signed-off-by: Stefan Beller --- submodule.c | 51 +++-- t/t5526-fetch-submodules.sh | 7 - 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/submodule.c b/submodule.c index dd478ed70bf..3f791f22771 100644 --- a/s

[PATCH v4 8/9] fetch: retry fetching submodules if needed objects were not fetched

2018-09-25 Thread Stefan Beller
e_commits(), so we'll also run that code in case the submodule recursion is set to "on". Signed-off-by: Stefan Beller --- builtin/fetch.c | 9 +- submodule.c | 185 ++-- t/t5526-fetch-submodules.sh | 16 3 files changed,

Re: [PATCH 1/8] sha1-array: provide oid_array_filter

2018-09-25 Thread Stefan Beller
On Sat, Sep 22, 2018 at 5:58 AM Ævar Arnfjörð Bjarmason wrote: > > > On Fri, Sep 21 2018, Stefan Beller wrote: > > > +/* > > + * Apply want to each entry in array, retaining only the entries for > > + * which the function returns true. Preserve the order of the ent

Re: [PATCH 1/1] read-cache: update index format default to v4

2018-09-25 Thread Stefan Beller
On Tue, Sep 25, 2018 at 7:30 AM Derrick Stolee wrote: > > On 9/25/2018 3:06 AM, Patrick Steinhardt wrote: > > On Mon, Sep 24, 2018 at 11:32:23PM +0200, SZEDER Gábor wrote: > >> On Mon, Sep 24, 2018 at 02:15:30PM -0700, Derrick Stolee via GitGitGadget > >> wrote: > >>> From: Derrick Stolee > >>>

Re: [PATCH 2/8] Add a place for (not) sharing stuff between worktrees

2018-09-25 Thread Stefan Beller
On Tue, Sep 25, 2018 at 9:55 AM Duy Nguyen wrote: > > And with that said, I wonder if the "local" part should be feature agnostic, > > or if we want to be "local" for worktrees, "local" for remotes, "local" > > for submodules (i.e. our own refs vs submodule refs). > > You lost me here. Yeah, me

Re: [PATCH 3/8] refs: new ref types to make per-worktree refs visible to all worktrees

2018-09-25 Thread Stefan Beller
On Tue, Sep 25, 2018 at 8:49 AM Duy Nguyen wrote: > > On Tue, Sep 25, 2018 at 4:48 AM Stefan Beller wrote: > > > This patch also makes it possible to specify refs from one worktree in > > > another one, e.g. > > > > > > git log worktrees/foo

Re: [PATCH 2/8] Add a place for (not) sharing stuff between worktrees

2018-09-25 Thread Stefan Beller
On Tue, Sep 25, 2018 at 8:36 AM Duy Nguyen wrote: > > On Tue, Sep 25, 2018 at 4:35 AM Stefan Beller wrote: > > > > On Sat, Sep 22, 2018 at 11:05 AM Nguyễn Thái Ngọc Duy > > wrote: > > > > > > When multiple worktrees are used, we need rules to d

Re: [PATCH 3/8] refs: new ref types to make per-worktree refs visible to all worktrees

2018-09-24 Thread Stefan Beller
On Sat, Sep 22, 2018 at 11:05 AM Nguyễn Thái Ngọc Duy wrote: > > One of the problems with multiple worktree is accessing per-worktree > refs of one worktree from another worktree. This was sort of solved by > multiple ref store, where the code can open the ref store of another > worktree and has

Re: [PATCH 2/8] Add a place for (not) sharing stuff between worktrees

2018-09-24 Thread Stefan Beller
On Sat, Sep 22, 2018 at 11:05 AM Nguyễn Thái Ngọc Duy wrote: > > When multiple worktrees are used, we need rules to determine if > something belongs to one worktree or all of them. Instead of keeping > adding rules when new stuff comes, have a generic rule: > > - Inside $GIT_DIR, which is

Re: [PATCH] submodule.c: Make get_superproject_working_tree() work when supermodule has unmerged changes of the submodule reference

2018-09-24 Thread Stefan Beller
On Mon, Sep 24, 2018 at 2:25 PM Sam McKelvie wrote: Thanks for writing a patch! I wonder if we can shorten the subject and make it a bit more concise, how about submodule: Alllow staged changes for get_superproject_working_tree or rev-parse: allow staged submodule in

Re: [RFC PATCH 3/3] diff: add --color-moved-ws=allow-mixed-indentation-change

2018-09-24 Thread Stefan Beller
On Mon, Sep 24, 2018 at 3:06 AM Phillip Wood wrote: > > From: Phillip Wood > > This adds another mode for highlighting lines that have moved with an > indentation change. Unlike the existing > --color-moved-ws=allow-indentation-change setting this mode uses the > visible change in the

Re: [RFC PATCH 1/3] xdiff-interface: make xdl_blankline() available

2018-09-24 Thread Stefan Beller
On Mon, Sep 24, 2018 at 3:06 AM Phillip Wood wrote: > > From: Phillip Wood > > This will be used by the move detection code. > > Signed-off-by: Phillip Wood > --- > xdiff-interface.c | 5 + > xdiff-interface.h | 5 + > 2 files changed, 10 insertions(+) > > diff --git

Re: [PATCH v5 1/9] submodule: add a print_config_from_gitmodules() helper

2018-09-24 Thread Stefan Beller
> > +int print_config_from_gitmodules(const char *key) > > I am thinking about adding a "struct repository" argument to this > function Sounds like a good idea.

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

2018-09-24 Thread Stefan Beller
On Mon, Sep 24, 2018 at 3:20 AM Antonio Ospite wrote: > > The third call, however, looks at the nested submodule at > > 'submodule/sub', which doesn't contain a '.gitmodules' file. So this > > function goes on with the second condition and calls > > get_oid(GITMODULES_INDEX, ), which then

Re: "git rev-parse --show-superproject-working-tree" fails with "fatal: BUG: returned path string doesn't match cwd?" if supermodule has unmerged changes of the submodule reference

2018-09-24 Thread Stefan Beller
On Mon, Sep 24, 2018 at 10:59 AM Sam McKelvie wrote: > > I experienced this problem using git 2.17.1; however, from inspection of the > next branch, function get_superproject_working_tree() in submodule.c has not > changed in 2 years. > > I believe the problem is related to the fact that when a

Re: [PATCH 1/3] t7001: reformat to newer style

2018-09-24 Thread Stefan Beller
On Mon, Sep 24, 2018 at 6:31 AM Derrick Stolee wrote: > > On 9/21/2018 7:58 PM, Stefan Beller wrote: > > The old formatting style is a real hindrance of getting people up to speed > > contributing as they use existing code as an example and follow that style. > > So let's

[PATCH 3/3] t0030: reformat style

2018-09-21 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/t0030-stripspace.sh | 525 -- 1 file changed, 254 insertions(+), 271 deletions(-) diff --git a/t/t0030-stripspace.sh b/t/t0030-stripspace.sh index 5ce47e8af51..c2281a39b58 100755 --- a/t/t0030-stripspace.sh +++ b/t/t0030

[PATCH 2/3] t7004: reformat style

2018-09-21 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/t7004-tag.sh | 149 +++-- 1 file changed, 56 insertions(+), 93 deletions(-) diff --git a/t/t7004-tag.sh b/t/t7004-tag.sh index 0b01862c23a..03a96b7f79e 100755 --- a/t/t7004-tag.sh +++ b/t/t7004-tag.sh @@ -144,26

[PATCH 0/3] bring some tests to newer style.

2018-09-21 Thread Stefan Beller
lines += ["\n"] if state == "lookingforstart": outlines += ["'\n"] else: print "what?" exit(1) with open(fnam

[PATCH 1/3] t7001: reformat to newer style

2018-09-21 Thread Stefan Beller
-by: Stefan Beller --- t/t7001-mv.sh | 268 +- 1 file changed, 134 insertions(+), 134 deletions(-) diff --git a/t/t7001-mv.sh b/t/t7001-mv.sh index 36b50d0b4c1..2251d24735c 100755 --- a/t/t7001-mv.sh +++ b/t/t7001-mv.sh @@ -3,74 +3,74 @@ test_description

[PATCH 5/8] submodule.c: do not copy around submodule list

2018-09-21 Thread Stefan Beller
access to the util pointer for longer that contains the commits that we need to fetch, which will be useful in a later patch. Signed-off-by: Stefan Beller --- submodule.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/submodule.c b/submodule.c index

[PATCH 6/8] submodule: fetch in submodules git directory instead of in worktree

2018-09-21 Thread Stefan Beller
ady. Signed-off-by: Stefan Beller --- submodule.c | 47 +++-- t/t5526-fetch-submodules.sh | 7 +- 2 files changed, 40 insertions(+), 14 deletions(-) diff --git a/submodule.c b/submodule.c index 209680ec076..8829e8d4eff 100644 --- a/s

[PATCH 7/8] fetch: retry fetching submodules if needed objects were not fetched

2018-09-21 Thread Stefan Beller
e_commits(), so we'll also run that code in case the submodule recursion is set to "on". Signed-off-by: Stefan Beller --- builtin/fetch.c | 9 +- submodule.c | 182 ++-- t/t5526-fetch-submodules.sh | 16 3 files changed,

[PATCH 8/8] builtin/fetch: check for submodule updates for non branch fetches

2018-09-21 Thread Stefan Beller
s so far, not for FETCH_HEAD. Make sure that fetching a superproject to its FETCH_HEAD, also respects the existence checks for objects in the submodule recursion. Signed-off-by: Stefan Beller --- builtin/fetch.c | 5 - t/t5526-fetch-submodules.sh | 2 +- 2 files changed, 5 insertio

[PATCH 4/8] submodule: move global changed_submodule_names into fetch submodule struct

2018-09-21 Thread Stefan Beller
The `changed_submodule_names` are only used for fetching, so let's make it part of the struct that is passed around for fetching submodules. Signed-off-by: Stefan Beller --- submodule.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff

[PATCH 3/8] submodule.c: sort changed_submodule_names before searching it

2018-09-21 Thread Stefan Beller
order. That makes "append then sort" more appropriate. Signed-off-by: Stefan Beller --- submodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodule.c b/submodule.c index 67469a8f513..2f5c19d0aac 100644 --- a/submodule.c +++ b/submodule.c @@ -1257

[PATCH 1/8] sha1-array: provide oid_array_filter

2018-09-21 Thread Stefan Beller
Helped-by: Junio C Hamano Signed-off-by: Stefan Beller --- sha1-array.c | 17 + sha1-array.h | 9 + 2 files changed, 26 insertions(+) diff --git a/sha1-array.c b/sha1-array.c index b94e0ec0f5e..d922e94e3fc 100644 --- a/sha1-array.c +++ b/sha1-array.c @@ -77,3 +77,20

[PATCH 2/8] submodule.c: fix indentation

2018-09-21 Thread Stefan Beller
The submodule subsystem is really bad at staying within 80 characters. Fix it while we are here. Signed-off-by: Stefan Beller --- submodule.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/submodule.c b/submodule.c index ed05339b588..67469a8f513 100644

[PATCHv3 0/8] fetch: make sure submodule oids are fetched

2018-09-21 Thread Stefan Beller
addressed all feedback so far. Stefan Beller (8): sha1-array: provide oid_array_filter submodule.c: fix indentation submodule.c: sort changed_submodule_names before searching it submodule: move global changed_submodule_names into fetch submodule struct submodule.c: do not copy aro

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

2018-09-21 Thread Stefan Beller
On Fri, Sep 21, 2018 at 3:18 PM Jeff King wrote: > I agree that core.* is kind of a kitchen sink, but I'm not sure that's > all that bad. Is "here is how Git finds refs in an alternate" any more This touches both "refs" and "alternates", which are Git concepts whereas ssh is not. > or less

[PATCH] string-list: add string_list_{pop, last} functions

2018-09-21 Thread Stefan Beller
(item); string_list_pop(, free_util); } Helped-by: Junio C Hamano Signed-off-by: Stefan Beller --- I will be resending this series shortly, but it will not contain this patch, as I will have no need for these any longer. For the record, this is the final state of this patch. It may

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

Re: [PATCH 0/3] Filter alternate references

2018-09-20 Thread Stefan Beller
On Thu, Sep 20, 2018 at 11:04 AM Taylor Blau wrote: > > Hi, > > This is a series to customize Git's behavior when listing references > from an alternate repository. It is motivated by the following example: > > Consider an upstream repository, a fork of it, and a local copy of that > fork.

Re: [PATCH 4/4] merge-recursive: rename merge_file_1() and merge_content()

2018-09-19 Thread Stefan Beller
On Wed, Sep 19, 2018 at 9:15 AM Elijah Newren wrote: > > Summary: > merge_file_1() -> merge_mode_and_contents() > merge_content() -> handle_content_merge() > > merge_file_1() is a very unhelpful name. Rename it to > merge_mode_and_contents() to reflect what it does. > > merge_content()

Re: [PATCH 2/9] sha1-array: provide oid_array_filter

2018-09-17 Thread Stefan Beller
On Mon, Sep 17, 2018 at 2:36 PM Stefan Beller wrote: > > Helped-by: Junio C Hamano > Signed-off-by: Stefan Beller > --- > sha1-array.c | 17 + > sha1-array.h | 9 + > 2 files changed, 26 insertions(+) > > diff --git a/sha1-array.c b/sha1-

[PATCH 5/9] submodule: move global changed_submodule_names into fetch submodule struct

2018-09-17 Thread Stefan Beller
The `changed_submodule_names` are only used for fetching, so let's make it part of the struct that is passed around for fetching submodules. Signed-off-by: Stefan Beller --- submodule.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff

[PATCH 6/9] submodule.c: do not copy around submodule list

2018-09-17 Thread Stefan Beller
access to the util pointer for longer that contains the commits that we need to fetch, which will be useful in a later patch. Signed-off-by: Stefan Beller --- submodule.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/submodule.c b/submodule.c index

[PATCH 8/9] fetch: retry fetching submodules if needed objects were not fetched

2018-09-17 Thread Stefan Beller
e_commits(), so we'll also run that code in case the submodule recursion is set to "on". Signed-off-by: Stefan Beller --- builtin/fetch.c | 9 ++-- submodule.c | 87 - t/t5526-fetch-submodules.sh | 16 +++ 3 files changed,

[PATCH 7/9] submodule: fetch in submodules git directory instead of in worktree

2018-09-17 Thread Stefan Beller
submodules that are currently not checked out. Signed-off-by: Stefan Beller --- submodule.c | 45 +++-- t/t5526-fetch-submodules.sh | 7 +- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/submodule.c b/submodule.c index 0

[PATCH 9/9] builtin/fetch: check for submodule updates for non branch fetches

2018-09-17 Thread Stefan Beller
s so far, not for FETCH_HEAD. Make sure that fetching a superproject to its FETCH_HEAD, also respects the existence checks for objects in the submodule recursion. Signed-off-by: Stefan Beller --- builtin/fetch.c | 5 - t/t5526-fetch-submodules.sh | 2 +- 2 files changed, 5 insertio

[PATCH 2/9] sha1-array: provide oid_array_filter

2018-09-17 Thread Stefan Beller
Helped-by: Junio C Hamano Signed-off-by: Stefan Beller --- sha1-array.c | 17 + sha1-array.h | 9 + 2 files changed, 26 insertions(+) diff --git a/sha1-array.c b/sha1-array.c index 265941fbf40..67db5eeec9a 100644 --- a/sha1-array.c +++ b/sha1-array.c @@ -77,3 +77,20

[PATCHv2 0/9] fetch: make sure submodule oids are fetched

2018-09-17 Thread Stefan Beller
s series aims to fix. The first patches provide new basic functionality and do some refactoring; the interesting part is in the two last patches. This was discussed in https://public-inbox.org/git/20180808221752.195419-1-sbel...@google.com/ and I think I addressed all feedback so far. Stefan

[PATCH 3/9] submodule.c: fix indentation

2018-09-17 Thread Stefan Beller
The submodule subsystem is really bad at staying within 80 characters. Fix it while we are here. Signed-off-by: Stefan Beller --- submodule.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/submodule.c b/submodule.c index a2b266fbfae..d29dfa3d1f5 100644

[PATCH 4/9] submodule.c: sort changed_submodule_names before searching it

2018-09-17 Thread Stefan Beller
order. That makes "append then sort" more appropriate. Signed-off-by: Stefan Beller --- submodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodule.c b/submodule.c index d29dfa3d1f5..c6eff7699f3 100644 --- a/submodule.c +++ b/submodule.c @@ -1256

[PATCH 1/9] string-list: add string_list_{pop, last} functions

2018-09-17 Thread Stefan Beller
(item); string_list_pop(, free_util); } Helped-by: Junio C Hamano Signed-off-by: Stefan Beller --- string-list.c | 14 ++ string-list.h | 15 +++ 2 files changed, 29 insertions(+) diff --git a/string-list.c b/string-list.c index 771c4550980..04db2b537c0 100644

Re: Brandon Williams's E-Mail bouncing

2018-09-17 Thread Stefan Beller
On Mon, Sep 17, 2018 at 10:51 AM Ævar Arnfjörð Bjarmason wrote: > > Aside from that particular address bouncing [...] it would be nice if git > {format-patch,send-email,check-contacts} & the .mailmap format would > support and understand some way to map addresses to > e.g. nore...@example.com,

Re: [PATCH 7/9] submodule: fetch in submodules git directory instead of in worktree

2018-09-13 Thread Stefan Beller
On Wed, Sep 12, 2018 at 11:36 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > This patch started as a refactoring to make 'get_next_submodule' more > > readable, but upon doing so, I realized that git-fetch actually doesn't > > need to be run in the worktree.

Re: [PATCH 3/3] archive: allow archive over HTTP(S) with proto v2

2018-09-12 Thread Stefan Beller
On Tue, Sep 11, 2018 at 10:36 PM Josh Steadmon wrote: > > Signed-off-by: Josh Steadmon > --- > builtin/archive.c | 8 +++- > http-backend.c | 10 +- > transport-helper.c | 5 +++-- > 3 files changed, 19 insertions(+), 4 deletions(-) > > diff --git a/builtin/archive.c

Re: [PATCH 2/3] archive: implement protocol v2 archive command

2018-09-12 Thread Stefan Beller
On Tue, Sep 11, 2018 at 10:36 PM Josh Steadmon wrote: > > This adds a new archive command for protocol v2. The command expects > arguments in the form "argument X" which are passed unmodified to > git-upload-archive--writer. > > This command works over the file://, Git, and SSH transports. HTTP >

Re: [PATCH 1/3] archive: use packet_reader for communications

2018-09-12 Thread Stefan Beller
On Tue, Sep 11, 2018 at 10:35 PM Josh Steadmon wrote: > > Using packet_reader will simplify version detection and capability > handling, which will make implementation of protocol v2 support in > git-archive easier. > > Signed-off-by: Josh Steadmon Reviewed-by: Stefan Beller

Re: [PATCH 4/9] submodule.c: sort changed_submodule_names before searching it

2018-09-12 Thread Stefan Beller
On Wed, Sep 12, 2018 at 11:18 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > We can string_list_insert() to maintain sorted-ness of the > > list as we find new items, or we can string_list_append() to > > build an unsorted list and sort it at the end just

[PATCH 6/9] submodule.c: do not copy around submodule list

2018-09-11 Thread Stefan Beller
access to the util pointer for longer that contains the commits that we need to fetch, which will be useful in a later patch. Signed-off-by: Stefan Beller --- submodule.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/submodule.c b/submodule.c index

[PATCH 8/9] fetch: retry fetching submodules if sha1 were not fetched

2018-09-11 Thread Stefan Beller
t be found. This doesn't support fetching to FETCH_HEAD yet, but only into a local branch. To make fetching into FETCH_HEAD work, we need some refactoring in builtin/fetch.c to adjust the calls to 'check_for_new_submodule_commits' that is coming in the next patch. Signed-off-by: Stefan Beller --

[PATCH 4/9] submodule.c: sort changed_submodule_names before searching it

2018-09-11 Thread Stefan Beller
order. That makes "append then sort" more appropriate. Signed-off-by: Stefan Beller --- submodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodule.c b/submodule.c index d29dfa3d1f5..c6eff7699f3 100644 --- a/submodule.c +++ b/submodule.c @@ -1256

[PATCH 7/9] submodule: fetch in submodules git directory instead of in worktree

2018-09-11 Thread Stefan Beller
out. Signed-off-by: Stefan Beller --- submodule.c | 43 ++--- t/t5526-fetch-submodules.sh | 7 +- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/submodule.c b/submodule.c index 00a9a3c6b12..1e6781504f0 100644

[PATCH 1/9] string-list: add string_list_{pop, last} functions

2018-09-11 Thread Stefan Beller
doesn't return such a pointer. You can use them in this pattern: while (list.nr) { struct string_list_item *item = string_list_last(); work_on(item); string_list_pop(); } Helped-by: Junio C Hamano Signed-off-by: Stefan Beller --- string-list.c | 14

[PATCH 0/9] fetch: make sure submodule oids are fetched

2018-09-11 Thread Stefan Beller
I think I addressed all feedback so far. Thanks, Stefan Stefan Beller (9): string-list: add string_list_{pop, last} functions sha1-array: provide oid_array_filter submodule.c: fix indentation submodule.c: sort changed_submodule_names before searching it submodule: move global changed_submo

[PATCH 9/9] builtin/fetch: check for submodule updates for non branch fetches

2018-09-11 Thread Stefan Beller
For Gerrit users that use submodules the invocation of fetch without a branch is their main use case. Signed-off-by: Stefan Beller --- builtin/fetch.c | 5 - t/t5526-fetch-submodules.sh | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/builtin/fetch.c b

[PATCH 5/9] submodule: move global changed_submodule_names into fetch submodule struct

2018-09-11 Thread Stefan Beller
The `changed_submodule_names` are only used for fetching, so let's make it part of the struct that is passed around for fetching submodules. Signed-off-by: Stefan Beller --- submodule.c | 42 +++--- 1 file changed, 23 insertions(+), 19 deletions(-) diff

[PATCH 2/9] sha1-array: provide oid_array_filter

2018-09-11 Thread Stefan Beller
Helped-by: Junio C Hamano Signed-off-by: Stefan Beller --- sha1-array.c | 18 ++ sha1-array.h | 5 + 2 files changed, 23 insertions(+) diff --git a/sha1-array.c b/sha1-array.c index 265941fbf40..76323935dd7 100644 --- a/sha1-array.c +++ b/sha1-array.c @@ -77,3 +77,21

<    1   2   3   4   5   6   7   8   9   10   >