[PATCH v3 12/32] commit: add repository argument to get_cached_commit_buffer

2018-06-28 Thread Stefan Beller
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller --- commit.c | 4 ++-- commit.h | 3 ++- object.c | 2 +- pretty.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/commit.c b/commit.c index cdfb1a025b6..9e2899bd5ad

[PATCH v3 11/32] commit: add repository argument to set_commit_buffer

2018-06-28 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller --- blame.c | 2 +- commit.c | 4 ++-- commit.h | 3 ++- object.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/blame.c b/blame.c index 8a0655a5997..cf102276bea 100644

[PATCH v3 17/32] object: allow lookup_object to handle arbitrary repositories

2018-06-28 Thread Stefan Beller
Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- object.c | 15 +++ object.h | 3 +-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/object.c b/object.c index f41f82c6725..9d74de95f5b 100644 --- a/object.c +++ b/object.c @@ -84,21 +84,20 @@ static

[PATCH v3 08/32] commit: add repository argument to lookup_commit_reference

2018-06-28 Thread Stefan Beller
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller --- bisect.c | 2 +- blame.c | 2 +- branch.c | 2 +- builtin/branch.c | 7 --- builtin/clone.c | 3 ++- builtin/describe.c| 2

[PATCH v3 16/32] object: allow object_as_type to handle arbitrary repositories

2018-06-28 Thread Stefan Beller
Signed-off-by: Stefan Beller --- object.c | 4 ++-- object.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/object.c b/object.c index e095d49b379..f41f82c6725 100644 --- a/object.c +++ b/object.c @@ -158,13 +158,13 @@ void *create_object(struct repository *r, const

[PATCH v3 19/32] tree: allow lookup_tree to handle arbitrary repositories

2018-06-28 Thread Stefan Beller
Signed-off-by: Stefan Beller --- tree.c | 10 +- tree.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tree.c b/tree.c index 45e89ff08eb..78d440a9c8f 100644 --- a/tree.c +++ b/tree.c @@ -195,13 +195,13 @@ int read_tree(struct tree *tree, int stage, struct

[PATCH v3 15/32] tag: add repository argument to deref_tag

2018-06-28 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- blame.c | 6 +++--- builtin/diff.c | 2 +- builtin/fmt-merge-msg.c | 3 ++- builtin/grep.c | 3 ++- builtin/name-rev.c | 3

[PATCH v3 14/32] tag: add repository argument to parse_tag_buffer

2018-06-28 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- builtin/replace.c | 2 +- log-tree.c| 2 +- object.c | 2 +- sha1-file.c | 2 +- tag.c | 4 ++-- tag.h | 3

[PATCH v3 06/32] tree: add repository argument to lookup_tree

2018-06-28 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- builtin/am.c| 6 -- builtin/diff-tree.c | 2 +- builtin/diff.c | 3 ++- builtin/reflog.c| 2 +- cache-tree.c| 3 ++- commit-graph.c

[PATCH v3 01/32] object: add repository argument to parse_object

2018-06-28 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- builtin/diff-tree.c | 3 ++- builtin/diff.c | 2 +- builtin/fast-export.c | 2 +- builtin/fmt-merge-msg.c | 6 -- builtin/fsck.c

[PATCH v3 18/32] blob: allow lookup_blob to handle arbitrary repositories

2018-06-28 Thread Stefan Beller
Signed-off-by: Stefan Beller --- blob.c | 10 +- blob.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/blob.c b/blob.c index 17b9314f0a0..342bdbb1bbe 100644 --- a/blob.c +++ b/blob.c @@ -5,13 +5,13 @@ const char *blob_type = "blob"; -s

[PATCH v3 20/32] commit: allow lookup_commit to handle arbitrary repositories

2018-06-28 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 10 +- commit.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/commit.c b/commit.c index aa5557dee84..8749e151451 100644 --- a/commit.c +++ b/commit.c @@ -53,13 +53,13 @@ struct commit *lookup_commit_or_die(const

[PATCH v3 02/32] object: add repository argument to lookup_object

2018-06-28 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller --- blob.c | 2 +- builtin/fast-export.c| 5 +++-- builtin/fsck.c | 5 +++-- builtin/name-rev.c | 3 ++- builtin/prune.c | 2 +- builtin/unpack

[PATCH v3 21/32] tag: allow lookup_tag to handle arbitrary repositories

2018-06-28 Thread Stefan Beller
Signed-off-by: Stefan Beller --- tag.c | 10 +- tag.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tag.c b/tag.c index fbb4659325b..46b5882ee12 100644 --- a/tag.c +++ b/tag.c @@ -92,13 +92,13 @@ struct object *deref_tag_noverify(struct object *o

[PATCH v3 10/32] commit: add repository argument to parse_commit_buffer

2018-06-28 Thread Stefan Beller
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- commit.c| 4 ++-- commit.h| 3 ++- object.c| 2 +- sha1-file.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/commit.c b

[PATCH v3 04/32] object: add repository argument to object_as_type

2018-06-28 Thread Stefan Beller
Signed-off-by: Stefan Beller --- blob.c | 2 +- builtin/fsck.c | 2 +- commit.c | 4 ++-- object.c | 2 +- object.h | 3 ++- refs.c | 2 +- tag.c | 2 +- tree.c | 2 +- 8 files changed, 10 insertions(+), 9 deletions(-) diff --git a/blob.c b

[PATCH v3 05/32] blob: add repository argument to lookup_blob

2018-06-28 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- blob.c | 2 +- blob.h | 3 ++- builtin/fast-export.c| 2 +- builtin/fsck.c | 3 ++- builtin/index-pack.c | 2

[PATCH v3 03/32] object: add repository argument to parse_object_buffer

2018-06-28 Thread Stefan Beller
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- builtin/fast-export.c| 3 ++- builtin/fsck.c | 7 +-- builtin/index-pack.c | 3 ++- builtin/unpack-objects.c | 3 ++- object.c

[PATCH v4 9/9] diff.c: add white space mode to move detection that allows indent changes

2018-06-28 Thread Stefan Beller
A +B + A + B When checking if the first A (both in the + and - lines) is a start of a block, we have to check all 'A' and record all the white space deltas such that we can find the example above to be just one block that is indented. Signed-off-by: Stefan Beller Signed-off-by: Juni

[PATCH v4 8/9] diff.c: factor advance_or_nullify out of mark_color_as_moved

2018-06-28 Thread Stefan Beller
ext` (which is how the name for pnext could be explained. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/diff.c b/diff.c index 70eeb40c5fd..4963819e530 100644 --- a/diff.c ++

[PATCH v4 1/9] xdiff/xdiff.h: remove unused flags

2018-06-28 Thread Stefan Beller
These flags were there since the beginning (3443546f6e (Use a *real* built-in diff generator, 2006-03-24), but were never used. Remove them. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- xdiff/xdiff.h | 8 1 file changed, 8 deletions(-) diff --git a/xdiff/xdiff.h b

[PATCH v4 5/9] diff.c: adjust hash function signature to match hashmap expectation

2018-06-28 Thread Stefan Beller
This makes the follow up patch easier. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/diff.c b/diff.c index ce7bedc1b92..d1bae900cdc 100644 --- a/diff.c +++ b/diff.c @@ -707,11 +707,15

[PATCH v4 2/9] xdiff/xdiffi.c: remove unneeded function declarations

2018-06-28 Thread Stefan Beller
There is no need to forward-declare these functions, as they are used after their implementation only. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- xdiff/xdiffi.c | 17 - 1 file changed, 17 deletions(-) diff --git a/xdiff/xdiffi.c b/xdiff/xdiffi.c index

[PATCH v4 0/9] Moved code detection: ignore space on uniform indentation

2018-06-28 Thread Stefan Beller
...@google.com/ Stefan Beller (9): xdiff/xdiff.h: remove unused flags xdiff/xdiffi.c: remove unneeded function declarations t4015: avoid git as a pipe input diff.c: do not pass diff options as keydata to hashmap diff.c: adjust hash function signature to match hashmap expectation diff.c: add

[PATCH v4 7/9] diff.c: decouple white space treatment from move detection algorithm

2018-06-28 Thread Stefan Beller
ations and (b) can reuse parts of this patch. By having the white space treatment in its own option, we'll also make it easier for a later patch to have an config option for spaces in the move detection. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/diff-opti

[PATCH v4 4/9] diff.c: do not pass diff options as keydata to hashmap

2018-06-28 Thread Stefan Beller
left over from an earlier round of 2e2d5ac184 (diff.c: color moved lines differently, 2017-06-30), before hashmap learned to pass the data pointer for us. Explanation-by: Jeff King Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v4 3/9] t4015: avoid git as a pipe input

2018-06-28 Thread Stefan Beller
the focus on getting the colors right. However the pattern used is not best practice as we do care about the exit code of Git. So let's not have Git as the upstream of a pipe. Piping the output of grep to some function is fine as we assume grep to be un-flawed in our test suite. Signed-off-by: Stefan Bell

[PATCH v4 6/9] diff.c: add a blocks mode for moved code detection

2018-06-28 Thread Stefan Beller
87o9j0uljo@evledraar.gmail.com/) Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/diff-options.txt | 8 -- diff.c | 6 +++-- diff.h | 5 ++-- t/t4015-diff-whitespace.sh | 49 -- 4 fil

Re: What's cooking in git.git (Jun 2018, #07; Thu, 28)

2018-06-28 Thread Stefan Beller
On Thu, Jun 28, 2018 at 2:40 PM Junio C Hamano wrote: > The tip of 'next' has been rewound and it currently has only 4 > topics. Quite a many topics are cooking in 'pu' and need to be > sifted into good bins (for 'next') and the remainder. Help is > appreciated in that area ;-) Which branches

Re: [PATCH 5/5] builtin/rebase: support running "git rebase "

2018-06-28 Thread Stefan Beller
On Thu, Jun 28, 2018 at 12:48 AM Pratik Karki wrote: > > This patch gives life to the skeleton added in the previous patch. > This patch makes real operation happen i.e. by using > `git -c rebase.usebuiltin=true rebase `. > With this patch, the basic operation of rebase can be done. Would it

Re: [PATCH 4/5] sequencer: refactor the code to detach HEAD to checkout.c

2018-06-28 Thread Stefan Beller
Hi Pratik, On Thu, Jun 28, 2018 at 12:48 AM Pratik Karki wrote: > > The motivation behind this commit is to extract the core part of > do_reset() from sequencer.c and move it to a new detach_head_to() > function in checkout.c. > [...] > > The new function will be used in the next commit by the

Re: [PATCH 3/5] rebase: refactor common shell functions into their own file

2018-06-28 Thread Stefan Beller
On Thu, Jun 28, 2018 at 12:48 AM Pratik Karki wrote: > > The function present in `git-legacy-rebase.sh` are used by backends > so, this refactor tries to extract the functions out so that, the it not only tries to, it actually does. :) > `git-legacy-rebase.sh` can be retired easily as the >

Re: [PATCH 2/5] rebase: start implementing it as a builtin

2018-06-28 Thread Stefan Beller
On Thu, Jun 28, 2018 at 12:48 AM Pratik Karki wrote: > > This commit imitates the strategy that was used to convert the > difftool to a builtin, see be8a90e (difftool: add a skeleton for the > upcoming builtin, 2017-01-17) for details: This commit renames the > shell script `git-rebase.sh` to

Re: [PATCH v5 2/8] upload-pack: implement ref-in-want

2018-06-27 Thread Stefan Beller
> Yeah after thinking more about this I wonder if we have some mental model that we want to teach to the users? What is the fetch command (using the ref-in-want capability) supposed to do? * update to the latest state observed by the latest remote talked to? * update to some approximate state

[PATCH] t/lib-submodule-update: fix absorbing test

2018-06-27 Thread Stefan Beller
replaced by the content of the superproject. Delete the submodule content check, which also fixes the && chain in the test. While at it, fix broken &&-chains in a couple neighboring tests. Signed-off-by: Eric Sunshine Signed-off-by: Stefan Beller --- > The test wants to verify that repla

Re: [PATCH 08/29] t7400: fix broken "submodule add/reconfigure --force" test

2018-06-27 Thread Stefan Beller
he test neglects to use that option. > > Fix both problems, as well as the broken &&-chain behind which they hid. > > Signed-off-by: Eric Sunshine This patch is Reviewed-by: Stefan Beller Thanks for this whole series (I just read the cover letter) and I think detecting broken &am

Re: [PATCH] submodule.c: report the submodule that an error occurs in

2018-06-27 Thread Stefan Beller
rse-submodules origin/master > >> ~/gerrit$ fatal: failed to unpack tree object > >> 07672f31880ba80300b38492df9d0acfcd6ee00a > >> > >> Give the hint which submodule has a problem. > >> > >> Signed-off-by: Stefan Beller > >> --- > >> submodule.c

[PATCH v3 6/8] diff.c: decouple white space treatment from move detection algorithm

2018-06-21 Thread Stefan Beller
ations and (b) can reuse parts of this patch. By having the white space treatment in its own option, we'll also make it easier for a later patch to have an config option for spaces in the move detection. Signed-off-by: Stefan Beller --- Documentation/diff-options.txt | 16 + diff.

[PATCH v3 7/8] diff.c: factor advance_or_nullify out of mark_color_as_moved

2018-06-21 Thread Stefan Beller
ext` (which is how the name for pnext could be explained. Signed-off-by: Stefan Beller --- diff.c | 32 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/diff.c b/diff.c index 6c523bafddf..040b46545e5 100644 --- a/diff.c +++ b/diff.c @@ -801,6 +801

[PATCH v3 5/8] diff.c: add a blocks mode for moved code detection

2018-06-21 Thread Stefan Beller
87o9j0uljo@evledraar.gmail.com/) Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- Documentation/diff-options.txt | 8 -- diff.c | 6 +++-- diff.h | 5 ++-- t/t4015-diff-whitespace.sh | 48 +- 4 fil

[PATCH v3 4/8] diff.c: adjust hash function signature to match hashmap expectation

2018-06-21 Thread Stefan Beller
This makes the follow up patch easier. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/diff.c b/diff.c index 112e6af2cc8..2a1a21d3b7a 100644 --- a/diff.c +++ b/diff.c @@ -707,11 +707,15

[PATCH v3 8/8] diff.c: add white space mode to move detection that allows indent changes

2018-06-21 Thread Stefan Beller
A +B + A + B When checking if the first A (both in the + and - lines) is a start of a block, we have to check all 'A' and record all the white space deltas such that we can find the example above to be just one block that is indented. Signed-off-by: Stefan Beller --- Documentation/diff-o

[PATCH v3 0/8] Moved code detection: ignore space on uniform indentation

2018-06-21 Thread Stefan Beller
-inbox.org/git/20180402224854.86922-1-sbel...@google.com/ Stefan Beller (8): xdiff/xdiff.h: remove unused flags xdiff/xdiffi.c: remove unneeded function declarations diff.c: do not pass diff options as keydata to hashmap diff.c: adjust hash function signature to match hashmap expectation diff.c

[PATCH v3 3/8] diff.c: do not pass diff options as keydata to hashmap

2018-06-21 Thread Stefan Beller
left over from an earlier round of 2e2d5ac184 (diff.c: color moved lines differently, 2017-06-30), before hashmap learned to pass the data pointer for us. Explanation-by: Jeff King Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH v3 1/8] xdiff/xdiff.h: remove unused flags

2018-06-21 Thread Stefan Beller
These flags were there since the beginning (3443546f6e (Use a *real* built-in diff generator, 2006-03-24), but were never used. Remove them. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- xdiff/xdiff.h | 8 1 file changed, 8 deletions(-) diff --git a/xdiff/xdiff.h b

Re: [PATCH 5/5] commit-graph: add repo arg to graph readers

2018-06-21 Thread Stefan Beller
> diff --git a/commit.c b/commit.c > index 0030e79940..38c12b002f 100644 > --- a/commit.c > +++ b/commit.c > @@ -317,7 +317,7 @@ struct tree *get_commit_tree(const struct commit *commit) > if (commit->graph_pos == COMMIT_NOT_FROM_GRAPH) > BUG("commit has NULL tree, but was

Re: [PATCH 2/5] commit-graph: add missing forward declaration

2018-06-21 Thread Stefan Beller
Hi Jonathan, On Thu, Jun 21, 2018 at 2:29 PM Jonathan Tan wrote: > > Signed-off-by: Jonathan Tan Both this and the previous patch look good to me; you seem to have better (stricter) checking for missing includes/forward declarations, am I missing a compile option? (I have DEVELOPER=1 in

Re: [PATCH v4 3/8] mem-pool: only search head block for available space

2018-06-21 Thread Stefan Beller
On Wed, Jun 20, 2018 at 1:17 PM Jameson Miller wrote: > > Instead of searching all memory blocks for available space to fulfill > a memory request, only search the head block. If the head block does > not have space, assume that previous block would most likely not be > able to fulfill request

Re: [PATCH v4 2/8] block alloc: add lifecycle APIs for cache_entry structs

2018-06-21 Thread Stefan Beller
> --- a/cache.h > +++ b/cache.h > @@ -339,6 +339,29 @@ extern void remove_name_hash(struct index_state *istate, > struct cache_entry *ce) > extern void free_name_hash(struct index_state *istate); > > > +/* Cache entry creation and cleanup */ > + > +/* > + * Create cache_entry intended for use in

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-21 Thread Stefan Beller
> OK, the fact I was overlooking was that the "config_fn_t" argument > passed to config_from_gitmodules is what we are actually worried about, > it's the config callback which could allow generic config in .gitmodules > to sneak in. That is the precise point that I was trying to communicate. :)

[PATCH] submodule.c: report the submodule that an error occurs in

2018-06-20 Thread Stefan Beller
not contain a path, for example: ~/gerrit$ git checkout --recurse-submodules origin/master ~/gerrit$ fatal: failed to unpack tree object 07672f31880ba80300b38492df9d0acfcd6ee00a Give the hint which submodule has a problem. Signed-off-by: Stefan Beller --- submodule.c | 2 +- t/lib

Re: [RFC PATCH 01/10] config: make config_from_gitmodules generally useful

2018-06-20 Thread Stefan Beller
Hi Antonio! On Wed, Jun 20, 2018 at 11:06 AM Antonio Ospite wrote: > I get that the _content_ of .gitmodules is not meant to be generic > config, but I still see some value in having a single point when its > _location_ is decided. I agree that a single point for the _location_ as well as the

Re: The state of the object store series

2018-06-19 Thread Stefan Beller
On Tue, Jun 19, 2018 at 3:37 PM Jonathan Tan wrote: > > > Floating on the mailing list, not cooking yet: > > One more is my bitmap one here: Oh right. Thanks for writing the series! When writing this I dabbled back and forth whether I only present the series that are on the critical path to

The state of the object store series

2018-06-19 Thread Stefan Beller
There is an ongoing effort to remove global state currently and switch over to pass around the relevant data structures; for most of it we end up passing around 'the_repository' as it contains everything there is. Merged into master: fcb6df32546 Merge branch 'sb/oid-object-info' a2cec42213c

Re: [GSoC][PATCH v2 0/3] rebase -i: rewrite reflog operations in C

2018-06-19 Thread Stefan Beller
On Tue, Jun 19, 2018 at 8:45 AM Alban Gruin wrote: > > This patch series rewrites the reflog operations from shell to C. This > is part of the effort to rewrite interactive rebase in C. This series looks good to me. Thanks, Stefan

Re: [PATCH] format-patch: clear UNINTERESTING flag before prepare_bases

2018-06-19 Thread Stefan Beller
mits, > thus `git format-patch --base Z..C` won't be able to > generate > the list of prerequisite patch ids. Clear UNINTERESTING flag with > clear_object_flags solves this issue. This makes sense; Reviewed-by: Stefan Beller

[PATCH 2/3] submodule: ensure core.worktree is set after update

2018-06-18 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 24 git-submodule.sh| 5 + 2 files changed, 29 insertions(+) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index bd250ca2164..dffc55ed8ee 100644 --- a/builtin

[PATCH 0/3] submodules with no working tree shall unset core.worktree

2018-06-18 Thread Stefan Beller
t;git submodule deinit" to unset the core.worktree setting as well. It turned out this one is tricky, as for that we also have to set it in the counter part, such as "submodule update". Thanks, Stefan Stefan Beller (3): submodule: unset core.worktree if no working tree is present

[PATCH 3/3] submodule deinit: unset core.worktree

2018-06-18 Thread Stefan Beller
When a submodule is deinit'd, the working tree is gone, so the setting of core.worktree is bogus. Unset it. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 2 ++ t/lib-submodule-update.sh | 2 +- t/t7400-submodule-basic.sh | 5 + 3 files changed, 8 insertions(+), 1

[PATCH 1/3] submodule: unset core.worktree if no working tree is present

2018-06-18 Thread Stefan Beller
module deinit", which will also make use of the new function submodule_unset_core_worktree(), which is why we expose it in this patch. Signed-off-by: Stefan Beller --- submodule.c | 14 ++ submodule.h | 2 ++ t/lib-submodule-update.sh | 3 ++- 3 fi

[PATCH] t7400: encapsulate setup code in test_expect_success

2018-06-18 Thread Stefan Beller
-by: Stefan Beller --- t/t7400-submodule-basic.sh | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh index 2f532529b82..812db137b8d 100755 --- a/t/t7400-submodule-basic.sh +++ b/t/t7400-submodule-basic.sh @@ -126,8 +126,10

Re: What's cooking in git.git (Jun 2018, #05; Mon, 18)

2018-06-18 Thread Stefan Beller
Hi Jacob, > * sb/diff-color-move-more (2018-05-21) 8 commits > (merged to 'next' on 2018-05-24 at 45f3fb7975) > + diff: color-moved white space handling options imply color-moved > + diff.c: add --color-moved-ignore-space-delta option > + diff.c: decouple white space treatment from move

Re: [GSoC][PATCH 2/3] rebase -i: rewrite setup_reflog_action() in C

2018-06-18 Thread Stefan Beller
On Mon, Jun 18, 2018 at 6:19 AM Alban Gruin wrote: > > This rewrites setup_reflog_action() from shell to C. > > A new command is added to rebase--helper.c, “setup-reflog”, as such as a > new flag, “verbose”, to silence the output of the checkout operation > called by setup_reflog_action(). > >

Re: [PATCH 03/23] midx: add midx builtin

2018-06-18 Thread Stefan Beller
> > But as this is plumbing and users should not need to worry about it > > this is optional, I would think. > > The design document is also in 'Documentation/technical' instead of just > 'Documentation/'. Do we have a pattern of linking to the technical > documents? Apparently we do (and I was

Re: [PATCH 02/23] midx: add midx format details to pack-format.txt

2018-06-18 Thread Stefan Beller
> >> + (C + 1) * 12 bytes providing the chunk offsets: > >> + First 4 bytes describe chunk id. Value 0 is a terminating > >> label. > >> + Other 8 bytes provide offset in current file for chunk to > >> start. > >> + (Chunks are provided in file-order, so you

Re: [PATCH v2 1/2] t5702: test fetch with multiple refspecs at a time

2018-06-18 Thread Stefan Beller
On Mon, Jun 18, 2018 at 12:15 PM Jonathan Tan wrote: > > On Mon, Jun 18, 2018 at 11:30 AM, Stefan Beller wrote: > >> +test_expect_success 'fetch supports various ways of have lines' ' > >> + rm -rf server client trace && > > > > Can w

Re: [PATCH v2 2/2] fetch: send "refs/tags/" prefix upon CLI refspecs

2018-06-18 Thread Stefan Beller
On Tue, Jun 5, 2018 at 2:41 PM Jonathan Tan wrote: > > When performing tag following, in addition to using the server's > "include-tag" capability to send tag objects (and emulating it if the > server does not support that capability), "git fetch" relies upon the > presence of refs/tags/* entries

Re: [PATCH v2 1/2] t5702: test fetch with multiple refspecs at a time

2018-06-18 Thread Stefan Beller
t -C client cat-file -e $(git -C server rev-parse prefix2) && > + git -C client cat-file -e $(git -C server rev-parse fetch-by-sha1) && > + test_must_fail git -C client cat-file -e \ > + $(git -C server rev-parse dwim-unwanted) && > + test_must_fail git -C client cat-file -e \ > + $(git -C server rev-parse exact-unwanted) && > + test_must_fail git -C client cat-file -e \ > + $(git -C server rev-parse completely-unrelated) > +' This test is precise and easy to understand; the patch is Reviewed-by: Stefan Beller (considering the test_when_finished comment as an optional nit)

Re: [PATCH] t7406-submodule-update: fix broken &&-chains

2018-06-18 Thread Stefan Beller
On Sat, Jun 16, 2018 at 1:33 PM SZEDER Gábor wrote: > > Three tests in 't7406-submodule-update' contain broken &&-chains, but > since they are all in subshells, chain-lint couldn't notice them. > > Signed-off-by: SZEDER Gábor This looks good to me; Thanks for spotting and fixing it, Stefan

Re: need for `git submodule update` over `git pull --recurse-submodules`?

2018-06-18 Thread Stefan Beller
On Sun, Jun 17, 2018 at 8:41 PM Shriramana Sharma wrote: > Do I need to execute any `git submodule` commands separately even if I > do `git pull --recurse-submodules`? Ideally you don't need "git submodule" commands any more, the rest of git is slowly converging to have builtin submodule

Re: fatal: could not reset submodule index

2018-06-15 Thread Stefan Beller
> # Trying again with submodule.recurse > git config --global submodule.recurse true > git clone main clone4 cd clone4 > git checkout with-submodule > # Submodule is still not automatically updated (sub folder is empty) > # It seems like submodule.recurse does not affect git clone That is true;

Re: [PATCH v2 05/31] tree: add repository argument to lookup_tree

2018-06-14 Thread Stefan Beller
On Thu, Jun 14, 2018 at 12:33 PM Derrick Stolee wrote: > > The 'tree' member of 'struct commit' was renamed to 'maybe_tree'. > > Resolving the merge was not very simple. I have a working merge > available on GitHub [1] as commit 99a899f7c12ef73840dbe79c71acb11034d707dd. Thanks for pointing this

Re: [PATCH 10/35] commit: add repository argument to lookup_commit

2018-06-14 Thread Stefan Beller
On Thu, Jun 14, 2018 at 9:22 AM Duy Nguyen wrote: > > On Wed, May 30, 2018 at 2:51 AM Stefan Beller wrote: > > diff --git a/shallow.c b/shallow.c > > index 9bb07a56dca..60fe1fe1e58 100644 > > --- a/shallow.c > > +++ b/shallow.c > > @@ -31,7 +31,7 @@ int r

Re: [PATCH v2 8/8] fetch-pack: implement ref-in-want

2018-06-14 Thread Stefan Beller
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > +static void receive_wanted_refs(struct packet_reader *reader, struct ref > *refs) > +{ ... > + > + for (r = refs; r; r = r->next) { > + if (!strcmp(end, r->name)) { > +

Re: [PATCH v2 7/8] fetch-pack: put shallow info in output parameter

2018-06-14 Thread Stefan Beller
> + !oidcmp(>peer_ref->old_oid, >old_oid)) { > + /* > +* These need to be reported as fetched, but we don > not do not or don't; there is no middle way. ;)

Re: [PATCH v2 6/8] fetch: refactor to make function args narrower

2018-06-14 Thread Stefan Beller
ent set of refs to be used instead of relying on the ones > stored in the transport struct. > This patch and the two prior refactoring patches are Reviewed-by: Stefan Beller

Re: [PATCH v2 3/8] upload-pack: test negotiation with changing repository

2018-06-14 Thread Stefan Beller
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > Add tests to check the behavior of fetching from a repository which > changes between rounds of negotiation (for example, when different > servers in a load-balancing agreement participate in the same stateless > RPC negotiation). This

Re: [PATCH v2 2/8] upload-pack: implement ref-in-want

2018-06-14 Thread Stefan Beller
Hi Brandon, On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > Currently, while performing packfile negotiation, clients are only > allowed to specify their desired objects using object ids. This causes > a vulnerability to failure when an object turns non-existent during I stopped

Re: [PATCH v2 1/8] test-pkt-line: add unpack-sideband subcommand

2018-06-14 Thread Stefan Beller
On Wed, Jun 13, 2018 at 2:39 PM Brandon Williams wrote: > > Add an 'unpack-sideband' subcommand to the test-pkt-line helper to > enable unpacking packet line data sent multiplexed using a sideband. > > Signed-off-by: Brandon Williams > --- > t/helper/test-pkt-line.c | 37

[PATCH] t5526: test recursive submodules when fetching moved submodules

2018-06-14 Thread Stefan Beller
The topic merged in 0c7ecb7c311 (Merge branch 'sb/submodule-move-nested', 2018-05-08) provided support for moving nested submodules. Remove the NEEDSWORK comment and implement the nested submodules test as the comment hinted at. Signed-off-by: Stefan Beller --- I found this when digging around

[PATCH] submodule: fix NULL correctness in renamed broken submodules

2018-06-14 Thread Stefan Beller
Duy Nguyen Helped-by: Heiko Voigt Signed-off-by: Stefan Beller --- submodule.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/submodule.c b/submodule.c index 939d6870ecd..0998ea23458 100644 --- a/submodule.c +++ b/submodule.c @@ -740,12 +740,14 @@ s

[PATCH v2 21/31] tag: allow parse_tag_buffer to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- tag.c | 10 +- tag.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tag.c b/tag.c index 46b5882ee12..682e7793059 100644 --- a/tag.c +++ b/tag.c @@ -126,7 +126,7 @@ void release_tag_memory(struct tag *t) t->date

[PATCH v2 20/31] tag: allow lookup_tag to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- tag.c | 10 +- tag.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/tag.c b/tag.c index fbb4659325b..46b5882ee12 100644 --- a/tag.c +++ b/tag.c @@ -92,13 +92,13 @@ struct object *deref_tag_noverify(struct object *o

[PATCH v2 28/31] object.c: allow parse_object to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- object.c | 14 +++--- object.h | 3 +-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/object.c b/object.c index b63a51febd4..62df8e11b63 100644 --- a/object.c +++ b/object.c @@ -245,28 +245,28 @@ struct object *parse_object_or_die(const

[PATCH v2 11/31] commit: add repository argument to get_cached_commit_buffer

2018-06-13 Thread Stefan Beller
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller --- commit.c | 4 ++-- commit.h | 3 ++- object.c | 2 +- pretty.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/commit.c b/commit.c index 667d4dc6cfd..ba06918ba41

[PATCH v2 19/31] commit: allow lookup_commit to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 10 +- commit.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/commit.c b/commit.c index ede31c46931..4b10e7173b5 100644 --- a/commit.c +++ b/commit.c @@ -52,13 +52,13 @@ struct commit *lookup_commit_or_die(const

[PATCH v2 30/31] commit.c: allow lookup_commit_reference_gently to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 8 commit.h | 4 +--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/commit.c b/commit.c index 7ee55f6b8f0..009e1d33e08 100644 --- a/commit.c +++ b/commit.c @@ -23,16 +23,16 @@ int save_commit_buffer = 1; const char

[PATCH v2 23/31] commit-slabs: remove realloc counter outside of slab struct

2018-06-13 Thread Stefan Beller
it. If we ever need to count the reallocations again, we can reintroduce the counter as part of 'struct slabname' in commit-slab-decl.h. Signed-off-by: Stefan Beller --- commit-slab-impl.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/commit-slab-impl.h b/commit-slab-impl.h index 87a9cadfcca

[PATCH v2 27/31] object.c: allow parse_object_buffer to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- object.c | 18 +- object.h | 3 +-- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/object.c b/object.c index 7a7b078e4d0..b63a51febd4 100644 --- a/object.c +++ b/object.c @@ -185,21 +185,21 @@ struct object

[PATCH v2 22/31] commit.c: allow parse_commit_buffer to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 10 +- commit.h | 3 +-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/commit.c b/commit.c index 4b10e7173b5..fe3b6ff216f 100644 --- a/commit.c +++ b/commit.c @@ -335,7 +335,7 @@ const void *detach_commit_buffer(struct commit

[PATCH v2 24/31] commit.c: migrate the commit buffer to the parsed object store

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 29 +++-- commit.h | 4 object.c | 5 + object.h | 4 4 files changed, 36 insertions(+), 6 deletions(-) diff --git a/commit.c b/commit.c index fe3b6ff216f..e9b22268997 100644 --- a/commit.c +++ b/commit.c

[PATCH v2 26/31] commit.c: allow get_cached_commit_buffer to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 4 ++-- commit.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/commit.c b/commit.c index 44d1a38187a..7ee55f6b8f0 100644 --- a/commit.c +++ b/commit.c @@ -270,10 +270,10 @@ void set_commit_buffer(struct repository *r, struct

[PATCH v2 31/31] commit.c: allow lookup_commit_reference to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 4 ++-- commit.h | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/commit.c b/commit.c index 009e1d33e08..7b60e0cb030 100644 --- a/commit.c +++ b/commit.c @@ -35,9 +35,9 @@ struct commit *lookup_commit_reference_gently(struct

[PATCH v2 29/31] tag.c: allow deref_tag to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- tag.c | 5 ++--- tag.h | 3 +-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/tag.c b/tag.c index 682e7793059..94a89b21cb5 100644 --- a/tag.c +++ b/tag.c @@ -64,12 +64,11 @@ int gpg_verify_tag(const struct object_id *oid, const char

[PATCH v2 25/31] commit.c: allow set_commit_buffer to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Stefan Beller --- commit.c | 4 ++-- commit.h | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/commit.c b/commit.c index e9b22268997..44d1a38187a 100644 --- a/commit.c +++ b/commit.c @@ -262,10 +262,10 @@ void free_commit_buffer_slab(struct buffer_slab *bs

[PATCH v2 09/31] commit: add repository argument to parse_commit_buffer

2018-06-13 Thread Stefan Beller
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- commit.c| 4 ++-- commit.h| 3 ++- object.c| 2 +- sha1-file.c | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/commit.c b

[PATCH v2 16/31] object: allow lookup_object to handle arbitrary repositories

2018-06-13 Thread Stefan Beller
Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- object.c | 15 +++ object.h | 3 +-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/object.c b/object.c index 876ca4977e2..c1c1cbc1f53 100644 --- a/object.c +++ b/object.c @@ -84,21 +84,20 @@ static

[PATCH v2 13/31] tag: add repository argument to parse_tag_buffer

2018-06-13 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- builtin/replace.c | 2 +- log-tree.c| 2 +- object.c | 2 +- sha1-file.c | 2 +- tag.c | 4 ++-- tag.h | 3

[PATCH v2 07/31] commit: add repository argument to lookup_commit_reference

2018-06-13 Thread Stefan Beller
to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller --- bisect.c | 2 +- blame.c | 2 +- branch.c | 2 +- builtin/branch.c | 7 --- builtin/clone.c | 3 ++- builtin/describe.c| 2

[PATCH v2 12/31] tag: add repository argument to lookup_tag

2018-06-13 Thread Stefan Beller
callers passing a repository other than the_repository at compile time. Signed-off-by: Jonathan Nieder Signed-off-by: Stefan Beller --- builtin/describe.c | 6 +++--- builtin/pack-objects.c | 2 +- builtin/replace.c | 2 +- log-tree.c | 2 +- object.c | 2 +- sha1

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