Re: [PATCH v2 0/6] git-submodule.sh: convert part of cmd_update to C

2018-07-17 Thread Stefan Beller
697a8ca git-submodule.sh: align error reporting > >> for update mode to use path > >> @@ -6,7 +6,6 @@ > >> on its path, so let's do that for invalid update modes, too. > >> > >> Signed-off-by: Stefan Beller > >> -

Re: Are clone/checkout operations deterministic?

2018-07-17 Thread Stefan Beller
On Tue, Jul 17, 2018 at 2:48 AM Ævar Arnfjörð Bjarmason wrote: > > > On Tue, Jul 17 2018, J. Paul Reed wrote: > > > Hey Git Devs, > > > > I have a bit of an odd question: do git clone/checkout operations have a > > deterministic ordering? > > > > That is: are files guaranteed to be laid down onto

Re: [PATCH v3 09/20] range-diff: adjust the output of the commit pairs

2018-07-17 Thread Stefan Beller
Hi Johannes, > > It's nice to see that the bulk of the range-diff functionality has > > been libified in this re-roll (residing in range-diff.c rather than > > Can we *please* stop calling it "re-roll"? Thanks. Fun fact of the day: First appearance of "reroll" in the public archive is (09 Dec

[PATCH v2 0/6] git-submodule.sh: convert part of cmd_update to C

2018-07-16 Thread Stefan Beller
v2: addressed review comments, renaming the struct, improving the commit message. v1: https://public-inbox.org/git/20180712194754.71979-1-sbel...@google.com/ I thought about writing it all in one go, but the series got too large, so let's chew one bite at a time. Thanks, Stefan Stefan Beller (6

[PATCH v2 3/6] builtin/submodule--helper: factor out submodule updating

2018-07-16 Thread Stefan Beller
Separate the command line parsing from the actual execution of the command within the repository. For now there is not a lot of execution as most of it is still in git-submodule.sh. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 59 + 1 file

[PATCH v2 6/6] submodule--helper: introduce new update-module-mode helper

2018-07-16 Thread Stefan Beller
determine_submodule_update_strategy accessible for arbitrary repositories. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 61 + git-submodule.sh| 16 +- 2 files changed, 62 insertions(+), 15 deletions(-) diff --git a/builtin/submodule

[PATCH v2 4/6] builtin/submodule--helper: store update_clone information in a struct

2018-07-16 Thread Stefan Beller
to migrate the rest of the submodule update into C, we're better off having access to the raw information in a helper struct. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git

[PATCH v2 2/6] git-submodule.sh: rename unused variables

2018-07-16 Thread Stefan Beller
. A later patch in this series also touches the communication between the submodule helper and git-submodule.sh, but let's have this as a preparatory patch, as it eases the next patch, which stores the raw data instead of the line printed for this communication. Signed-off-by: Stefan Beller

[PATCH v2 5/6] builtin/submodule--helper: factor out method to update a single submodule

2018-07-16 Thread Stefan Beller
In a later patch we'll find this method handy. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index fb54936efc7..034ba1bb2e0 100644

[PATCH v2 1/6] git-submodule.sh: align error reporting for update mode to use path

2018-07-16 Thread Stefan Beller
All other error messages in cmd_update are reporting the submodule based on its path, so let's do that for invalid update modes, too. Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index

Re: [PATCH 4/6] builtin/submodule--helper: store update_clone information in a struct

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 12:37 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > The information that is printed for update_submodules in > > 'submodule--helper update-clone' and consumed by 'git submodule update' > > is stored as a string per submodule.

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

2018-07-16 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 6/9] diff.c: add a blocks mode for moved code detection

2018-07-16 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

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

2018-07-16 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 9/9] diff.c: add white space mode to move detection that allows indent changes

2018-07-16 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 7/9] diff.c: decouple white space treatment from move detection algorithm

2018-07-16 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-optio

[PATCHv5 0/9] Reroll of sb/diff-color-move-more

2018-07-16 Thread Stefan Beller
hope this is not too late of a resend; otherwise just ignore it as the end result is the same) Thanks, Stefan 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

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

2018-07-16 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 1/9] xdiff/xdiff.h: remove unused flags

2018-07-16 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 3/9] t4015: avoid git as a pipe input

2018-07-16 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: Stef

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

2018-07-16 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

Re: [PATCH 16/16] commit-reach: use can_all_from_reach

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > > From: Derrick Stolee > > The is_descendant_of method previously used in_merge_bases() to check if > the commit can reach any of the commits in the provided list. This had > two performance problems: > > 1. The performance

Re: [PATCH 15/16] commit-reach: make can_all_from_reach... linear

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > > Note how the time increases between the two cases in the two versions. > The new code increases relative to the number of commits that need to be > walked, but not directly relative to the number of 'from' commits. Cool!

Re: [PATCH 14/16] commit-reach: replace ref_newer logic

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > > From: Derrick Stolee > > The ref_newer method is used by 'git push' to check if a force-push is > required. This method does not use any kind of cutoff when walking, so > in the case of a force-push will walk all

Re: [PATCH 13/16] test-reach: test can_all_from_reach_with_flags

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > > From: Derrick Stolee > > The can_all_from_reach_with_flags method is used by ok_to_give_up in > upload-pack.c to see if we have done enough negotiation during a fetch. > This method is intentionally created to preserve

Re: [PATCH 12/16] test-reach: test reduce_heads

2018-07-16 Thread Stefan Beller
> +test_expect_success 'reduce_heads' ' > + cat >input <<-\EOF && > + X:commit-1-10 > + X:commit-2-8 > + X:commit-3-6 > + X:commit-4-4 > + X:commit-1-7 > + X:commit-2-5 > + X:commit-3-3 > +

Re: [PATCH 11/16] test-reach: test get_merge_bases_many

2018-07-16 Thread Stefan Beller
> +test_expect_success 'get_merge_bases_many' ' > + cat >input <<-\EOF && > + A:commit-5-7 > + X:commit-4-8 > + X:commit-6-6 > + X:commit-8-3 > + EOF > + { > + printf "get_merge_bases_many(A,X):\n" && > +

Re: [PATCH 06/16] upload-pack: generalize commit date cutoff

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > > From: Derrick Stolee > > The ok_to_give_up() method uses the commit date as a cutoff to avoid > walking the entire reachble set of commits. Before moving the > reachable() method to commit-reach.c, pull out the dependence

Re: [PATCH 03/16] commit-reach: move commit_contains from ref-filter

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > + > +int commit_contains(struct ref_filter *filter, struct commit *commit, > + struct commit_list *list, struct contains_cache *cache) [...] > - > -static int commit_contains(struct ref_filter *filter,

Re: [PATCH 02/16] commit-reach: move ref_newer from remote.c

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > > From: Derrick Stolee > > Signed-off-by: Derrick Stolee Another verbatim move! (I'll just re-iterate that the --color-moved option is very helpful in these reviews) Thanks, Stefan > +++ b/commit-reach.h > @@ -38,4

Re: [PATCH 01/16] commit-reach: move walk methods from commit.c

2018-07-16 Thread Stefan Beller
On Mon, Jul 16, 2018 at 6:00 AM Derrick Stolee via GitGitGadget wrote: > > From: Derrick Stolee > > Signed-off-by: Derrick Stolee This looks good, apart from nits below. Thanks, Stefan > diff --git a/commit-reach.c b/commit-reach.c > new file mode 100644 > index 0..f2e2f7461 > ---

Re: [PATCH v2 00/16] object_id part 14

2018-07-16 Thread Stefan Beller
blems. This looks good to me, too. I just had a hickup with the patch replacing number magic ( "(num_parents * 50) + 20") in a strbuf_grow, but I do not see the problem there, it is just a bit of overly large grow estimates. Despite that said, this series is Reviewed-by: Stefan Beller Thanks, Stefan

Re: [PATCH] blame: prefer xsnprintf to strcpy for colors

2018-07-13 Thread Stefan Beller
On Fri, Jul 13, 2018 at 2:04 PM Jeff King wrote: > > On Fri, Jul 13, 2018 at 01:58:05PM -0700, Stefan Beller wrote: > > > > I'm sad that this strcpy() wasn't caught in review. IMHO we should avoid > > > that function altogether, even when we _think_ it can't trigge

Re: [PATCH] blame: prefer xsnprintf to strcpy for colors

2018-07-13 Thread Stefan Beller
On Fri, Jul 13, 2018 at 1:43 PM Jeff King wrote: > --- > Another option would just be color_parse(repeated_meta_color, "cyan"). > The run-time cost is slightly higher, but it probably doesn't matter > here, and perhaps it's more readable. > Thanks for posting this again; this looks good to me!

Re: [PATCH 2/2] fsck: downgrade gitmodulesParse default to "info"

2018-07-13 Thread Stefan Beller
> Considering both sets of arguments, it makes sense to loosen > this check for now. > I agree with this reasoning, > > Signed-off-by: Jeff King This and the previous patch are Reviewed-by: Stefan Beller

[PATCH 3/6] builtin/submodule--helper: factor out submodule updating

2018-07-12 Thread Stefan Beller
Separate the command line parsing from the actual execution of the command within the repository. For now there is not a lot of execution as most of it is still in git-submodule.sh. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 59 + 1 file

[PATCH 4/6] builtin/submodule--helper: store update_clone information in a struct

2018-07-12 Thread Stefan Beller
to migrate the rest of the submodule update into C, we're better off having access to the raw information in a helper struct. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 37 +++-- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git

[PATCH 2/6] git-submodule.sh: rename unused variables

2018-07-12 Thread Stefan Beller
. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 5 ++--- git-submodule.sh| 4 ++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 20ae9191ca3..ebcfe85bfa9 100644 --- a/builtin/submodule

[PATCH 5/6] builtin/submodule--helper: factor out method to update a single submodule

2018-07-12 Thread Stefan Beller
In a later patch we'll find this method handy. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index c9c3fe2bf28..4bbf580df79 100644

[PATCH 1/6] git-submodule.sh: align error reporting for update mode to use path

2018-07-12 Thread Stefan Beller
All other error messages in cmd_update are reporting the submodule based on its path, so let's do that for invalid update modes, too. Signed-off-by: Stefan Beller --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-submodule.sh b/git-submodule.sh index

[PATCH 6/6] submodule--helper: introduce new update-module-mode helper

2018-07-12 Thread Stefan Beller
determine_submodule_update_strategy accessible for arbitrary repositories. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 61 + git-submodule.sh| 16 +- 2 files changed, 62 insertions(+), 15 deletions(-) diff --git a/builtin/submodule

[PATCH 0/6] git-submodule.sh: convert part of cmd_update to C

2018-07-12 Thread Stefan Beller
I thought about writing it all in one go, but the series got too large, so let's chew one bite at a time. Thanks, Stefan Stefan Beller (6): git-submodule.sh: align error reporting for update mode to use path git-submodule.sh: rename unused variables builtin/submodule--helper: factor out

[PATCH] RFC: submodule-config: introduce trust level

2018-07-12 Thread Stefan Beller
. Signed-off-by: Stefan Beller --- This is on top of ao/config-from-gitmodules. submodule-config.c | 31 --- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/submodule-config.c b/submodule-config.c index 77421a49719..09eab9f00e0 100644 --- a/submodule-config.c

Re: [PATCH v1] handle lower case drive letters on Windows

2018-07-11 Thread Stefan Beller
On Wed, Jul 11, 2018 at 10:54 AM Ben Peart wrote: > > Teach test-drop-caches to handle lower case drive letters on Windows. As someone not quite familiar with Windows (and using Git there), is this addressing a user visible issue, or a developer visible issue? (It looks to me as the latter as it

Re: [PATCH 0/3] rebase -r: support octopus merges

2018-07-11 Thread Stefan Beller
On Wed, Jul 11, 2018 at 10:35 AM Junio C Hamano wrote: > To be honest, I am not sure if there still are people who use > octopus The latest merge with more than 2 parents in linux.git is df958569dbaa (Merge branches 'acpi-tables' and 'acpica', 2018-07-05), although looking through the log of

[PATCH] ws: do not reset and set color twice

2018-07-10 Thread Stefan Beller
that indicates if the color is already set. Signed-off-by: Stefan Beller --- The whole series is also available via git fetch http://github.com/stefanbeller/git ws_cleanup-ontop-range-diff and concludes my cleanup on top of the range-diff series for now. What is left is to refactor

[PATCH] diff.c: clarify emit_line_0

2018-07-10 Thread Stefan Beller
) could be a stricter check to consolidate with ws_check_emit (and not emit the color/reset twice). Signed-off-by: Stefan Beller --- oops wrong patch, this one should do. Now this passes all tests. diff.c | 84 +++--- t/t4015-diff

[PATCH 1/2] diff.c: convert emit_line_ws_markup to take string for sign

2018-07-10 Thread Stefan Beller
For the diff of diffs, we have more than one character at the beginning of the line with special meaning, so let's pass around a string that contains all the markup for the line Signed-off-by: Stefan Beller --- diff.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH 0/2] Re: [PATCH v3 14/20] diff: add an internal option to dual-color diffs of diffs

2018-07-10 Thread Stefan Beller
add a burden instead of just taking these patches). I can send up a cleanup series after yours lands, as well. Thanks, Stefan Stefan Beller (2): diff.c: convert emit_line_ws_markup to take string for sign WIP diff.c: clarify emit_line_0 diff.c | 84

[PATCH 1/2] diff.c: convert emit_line_ws_markup to take string for sign

2018-07-10 Thread Stefan Beller
For the diff of diffs, we have more than one character at the beginning of the line with special meaning, so let's pass around a string that contains all the markup for the line Signed-off-by: Stefan Beller --- diff.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff

[PATCH 2/2] WIP diff.c: clarify emit_line_0

2018-07-10 Thread Stefan Beller
the sign * another follow up cleanup (that also touches the tests) could be a stricter check to consolidate with ws_check_emit (and not emit the color/reset twice) Signed-off-by: Stefan Beller --- diff.c | 78 -- 1 file changed, 37 insertions

Re: [PATCH v3 16/20] range-diff --dual-color: work around bogus white-space warning

2018-07-10 Thread Stefan Beller
On Tue, Jul 10, 2018 at 3:08 AM Johannes Schindelin wrote: > > Hi Junio, > > On Mon, 9 Jul 2018, Junio C Hamano wrote: > > > I also wonder if we should be feeding the context lines to ws.c > > machinery in the first place though. > > It *is* confusing, I know. The entire "diff of diffs" concept

Re: [PATCH 1/3] t7405: add a file/submodule conflict

2018-07-10 Thread Stefan Beller
On Tue, Jul 10, 2018 at 8:28 AM Elijah Newren wrote: > > On Mon, Jul 9, 2018 at 2:11 PM, Stefan Beller wrote: > > On Sat, Jul 7, 2018 at 1:44 PM Elijah Newren wrote: > >> > >> In the case of a file/submodule conflict, although both cannot exist at >

Re: [PATCH v2 on ds/commit-graph-fsck 0/6] Object store refactoring: commit graph

2018-07-09 Thread Stefan Beller
Hi Jonathan, > This is on ds/commit-graph-fsck. > [...] > I've also added a patch (patch 1) that removes some duplication of > implementation that Junio talked about in [1]. I think this series is good; Thanks, Stefan

Re: [PATCH v2 1/6] commit-graph: refactor preparing commit graph

2018-07-09 Thread Stefan Beller
t; { > uint32_t pos; > - if (!core_commit_graph) > + if (!prepare_commit_graph()) > return; > - prepare_commit_graph(); > - if (commit_graph && find_commit_in_graph(item, commit_graph, )) > + if (find_commit_in_graph(item, commit_graph, )) > fill_commit_graph_info(item, commit_graph, pos); here too, This is Reviewed-by: Stefan Beller

Re: [PATCH 1/3] t7405: add a file/submodule conflict

2018-07-09 Thread Stefan Beller
On Sat, Jul 7, 2018 at 1:44 PM Elijah Newren wrote: > > In the case of a file/submodule conflict, although both cannot exist at > the same path, we expect both to be present somewhere for the user to be > able to resolve the conflict with. Add a testcase for this. > > Signed-off-by: Elijah

Re: [PATCH v3 17/20] range-diff: add a man page

2018-07-09 Thread Stefan Beller
On Mon, Jul 9, 2018 at 1:00 PM Johannes Schindelin wrote: > > Hi Stefan, > > On Mon, 9 Jul 2018, Stefan Beller wrote: > > > On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget > > wrote: > > > > > +'git range-diff' [--color=[]] [

Re: [PATCH v3 16/20] range-diff --dual-color: work around bogus white-space warning

2018-07-09 Thread Stefan Beller
On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget wrote: > > From: Johannes Schindelin > > When displaying a diff of diffs, it is possible that there is an outer > `+` before a context line. That happens when the context changed between > old and new commit. When that context

Re: [PATCH v3 14/20] diff: add an internal option to dual-color diffs of diffs

2018-07-09 Thread Stefan Beller
On Tue, Jul 3, 2018 at 4:27 AM Johannes Schindelin via GitGitGadget wrote: > > From: Johannes Schindelin > > When diffing diffs, it can be quite daunting to figure out what the heck > is going on, as there are nested +/- signs. > > Let's make this easier by adding a flag in diff_options that

Re: [PATCH v3 17/20] range-diff: add a man page

2018-07-09 Thread Stefan Beller
On Tue, Jul 3, 2018 at 4:26 AM Johannes Schindelin via GitGitGadget wrote: > +'git range-diff' [--color=[]] [--no-color] [] > + [--dual-color] [--creation-factor=] > + ( | ... |) > + > +DESCRIPTION > +--- > + > +This command shows the differences between two versions of

Re: [PATCH 07/17] commit: increase commit message buffer size

2018-07-09 Thread Stefan Beller
On Mon, Jul 9, 2018 at 6:09 AM Derrick Stolee wrote: > > On 7/8/2018 7:36 PM, brian m. carlson wrote: > > 100 bytes is not sufficient to ensure we can write a commit message > > buffer when using a 32-byte hash algorithm. Increase the buffer size to > > ensure we have sufficient space. > > > >

Re: [PATCH v6 2/8] read-cache: teach make_cache_entry to take object_id

2018-07-02 Thread Stefan Beller
On Mon, Jul 2, 2018 at 12:49 PM Jameson Miller wrote: > > Teach make_cache_entry function to take object_id instead of a SHA-1. This repeats the subject line? Sign off missing.

Re: Feature request : "git fsck" should show the percentage of completeness in step "Checking connectivity:"

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 9:22 AM Toralf Förster wrote: > > as "git fsck" does it already for "Checking objects:" > > Is this a valid feature request? Yes it is. However it is most likely to have the feature incorporated if it comes in form of a patch. So clone one of the git.git repositories

Re: [PATCH] git-gui: use commit message template

2018-07-02 Thread Stefan Beller
+cc Pat, in the hope of an answer. See https://public-inbox.org/git/xmqqd0z61xsv@gitster-ct.c.googlers.com/ on the state of git-gui and its lack of maintenance. Maybe Junio will pickup this patch. On Mon, Jul 2, 2018 at 11:35 AM Martin Schön wrote: > > Use the file described by

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

2018-07-02 Thread Stefan Beller
On Mon, Jul 2, 2018 at 10:36 AM Brandon Williams wrote: > > On 06/28, Stefan Beller wrote: > > The option of --color-moved has proven to be useful as observed on the > > mailing list. However when refactoring sometimes the indentation changes, > > for example when

Re: [PATCH 12/25] t7810: use test_expect_code() instead of hand-rolled comparison

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 5:25 PM Eric Sunshine wrote: > > This test manually checks the exit code of git-grep for a particular > value. In doing so, it intentionally breaks the &&-chain. Modernize the > test by taking advantage of test_expect_code() and a normal &&-chain. > > Signed-off-by: Eric

Re: [PATCH 00/25] fix buggy tests, modernize tests, fix broken &&-chains

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote: > > This series fixes several buggy tests which went undetected due to > broken &&-chains in subshells, modernizes some tests to take advantage > of test functions (test_might_fail(), test_write_lines(), etc.), and > fixes a lot of broken

Re: [PATCH 02/25] t: use test_write_lines() instead of series of 'echo' commands

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 5:24 PM Eric Sunshine wrote: > > These tests employ a noisy subshell (with missing &&-chain) to feed > input into Git commands or files: > > (echo a; echo b; echo c) | git some-command ... > > Simplify by taking advantage of test_write_lines(): > > test_write_lines

Re: [PATCH 01/25] t: use test_might_fail() instead of manipulating exit code manually

2018-07-02 Thread Stefan Beller
> diff --git a/t/t4012-diff-binary.sh b/t/t4012-diff-binary.sh > index 0a8af76aab..6579c81216 100755 > --- a/t/t4012-diff-binary.sh > +++ b/t/t4012-diff-binary.sh > @@ -102,10 +102,8 @@ test_expect_success 'apply binary patch' ' > > test_expect_success 'diff --no-index with binary creation' ' >

Re: [PATCH] xdiff: reduce indent heuristic overhead

2018-07-02 Thread Stefan Beller
On Sun, Jul 1, 2018 at 8:57 AM Michael Haggerty wrote: > > On 06/29/2018 10:28 PM, Stefan Beller wrote: > > [...] > > Adds some threshold to avoid expensive cases, like: > > > > ``` > > #!python > > open('a', 'w').write(" \n" * 1

[PATCH] xdiff: reduce indent heuristic overhead

2018-06-29 Thread Stefan Beller
ab.mercurial-scm.org/rHGc420792217c89622482005c99e959b9071c109c5 Signed-off-by: Stefan Beller --- Jun, Junio By changing the authorship we'd want to have a sign off from the original author, before applying; in the previous attempt, I was merely taking the code from mercurial as their copy of xdiff is also LGPLv2 s

Re: [RFC PATCH 13/13] commit-reach: use can_all_from_reach

2018-06-29 Thread Stefan Beller
Hi Derrick, On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > > The is_descendant_of method previously used in_merge_bases() to check if > the commit can reach any of the commits in the provided list. This had > two performance problems: > > 1. The performance is quadratic in worst-case. >

Re: [RFC PATCH 11/13] commit-reach: make can_all_from_reach... linear

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > > The can_all_from_reach_with_flags() algorithm is currently quadratic in > the worst case, because it calls the reachable() method for every 'from' > without tracking which commits have already been walked or which can > already reach a

Re: [RFC PATCH 08/13] test-reach: test reduce_heads()

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > > Signed-off-by: Derrick Stolee > --- > t/t6600-test-reach.sh | 26 ++ > 1 file changed, 26 insertions(+) > > diff --git a/t/t6600-test-reach.sh b/t/t6600-test-reach.sh > index c9337b6b46..0f60db9c60 100755 > ---

Re: [RFC PATCH 07/13] test-reach

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 9:13 AM Derrick Stolee wrote: > +# Construct a grid-like commit graph with points (x,y) > +# with 1 <= x <= 10, 1 <= y <= 10, where (x,y) has > +# parents (x-1, y) and (x, y-1), keeping in mind that > +# we drop a parent if a coordinate is nonpositive. > +# > +#

Re: [RFC PATCH 06/13] commit-reach: move can_all_from_reach_with_flag()

2018-06-29 Thread Stefan Beller
Hi Derrick, > +static int reachable(struct commit *from, int with_flag, int assign_flag, > time_t min_commit_date) [...] > + if (commit->date < min_commit_date) > + continue; [...] > +int can_all_from_reach_with_flag(struct object_array from, > +

Re: [RFC PATCH 05/13] upload-pack: refactor ok_to_give_up()

2018-06-29 Thread Stefan Beller
Hi Derrick, > -static int ok_to_give_up(void) > +static int can_all_from_reach_with_flag(struct object_array from, This method is hard to read; at first I thought you missed a word, but then I realized that it asks "can all 'from' members reach ['something'] and we pass in the 'flag', so maybe

Re: [RFC PATCH 03/13] commit-reach: move commit_contains from ref-filter

2018-06-29 Thread Stefan Beller
Hi Derrick, > +struct ref_filter_cbdata { > + struct ref_array *array; > + struct ref_filter *filter; > + struct contains_cache contains_cache; > + struct contains_cache no_contains_cache; These members also seem to be moved whitespace-inconsistently. Could you clarify in

Re: [RFC PATCH 01/13] commit-reach: move walk methods from commit.c

2018-06-29 Thread Stefan Beller
Hi Derrick, > +/* Remember to update object flag allocation in object.h */ > +#define PARENT1 (1u<<16) > +#define PARENT2 (1u<<17) > +#define STALE (1u<<18) > +#define RESULT (1u<<19) Something is up with whitespaces here, apart from that this patch looks good.

Re: fast-import slowness when importing large files with small differences

2018-06-29 Thread Stefan Beller
+cc Jun Wu, original author of these patches On Fri, Jun 29, 2018 at 1:39 PM Jeff King wrote: > > Interesting pieces regarding performance: > > > > c420792217c8 xdiff: reduce indent heuristic overhead > > https://phab.mercurial-scm.org/rHGc420792217c89622482005c99e959b9071c109c5 Going by the

[PATCH] xdiff: reduce indent heuristic overhead

2018-06-29 Thread Stefan Beller
as no visible impact on performance. Differential Revision: https://phab.mercurial-scm.org/D2601 Signed-off-by: Stefan Beller --- This applies on our master branch, I have not thought of a good commit message or if we need to test it. Thanks, Stefan

Re: fast-import slowness when importing large files with small differences

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 3:18 AM Mike Hommey wrote: > > Hi, > > I noticed some slowness when fast-importing data from the Firefox mercurial > repository, where fast-import spends more than 5 minutes importing ~2000 > revisions of one particular file. I reduced a testcase while still > using real

Re: [PATCH 3/3] .mailmap: map names with multiple emails to the same author identity

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 10:42 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > There are multiple author idents who have different email addresses, but > > the same name; assume they are the same person, as the world of open source > > is actual

Re: [PATCH v3 00/32] object-store: lookup_commit

2018-06-29 Thread Stefan Beller
On Fri, Jun 29, 2018 at 11:03 AM Junio C Hamano wrote: > > Junio C Hamano writes: > > > One technique these (not just this) recent efforts seem to be > > forgetting is to introduce "new" names that take a_repo and then > > make the existing one a thin wrapper that calls the new one with > >

[PATCH 1/3] .mailmap: merge different spellings of names

2018-06-28 Thread Stefan Beller
This is a continuation of 94b410bba86 (.mailmap: Map email addresses to names, 2013-07-12), merging names that are spelled differently but have the same author email to the same person. Most spellings differed in accents or the order of names. Signed-off-by: Stefan Beller --- .mailmap | 11

[PATCH 2/3] .mailmap: assume Jason McMullan to be the same person

2018-06-28 Thread Stefan Beller
addresses, 2013-08-12) we learned both their email bounce, so asking is no option. Signed-off-by: Stefan Beller --- .mailmap | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.mailmap b/.mailmap index f165222a782..ff96ef7401f 100644 --- a/.mailmap +++ b/.mailmap @@ -82,10

[PATCH 3/3] .mailmap: map names with multiple emails to the same author identity

2018-06-28 Thread Stefan Beller
Hocevar Sam Vilain Sam Vilain s...@vilain.net Santi Béjar @@ -216,34 +296,37 @@ Sean Estabrooks Sebastian Schuberth Seth Falcon Shawn O. Pearce -Wei Shuyu Shuyu Wei Sidhant Sharma Sidhant Sharma [:tk] -Simon Hausmann Simon Hausmann -Stefan Beller +Simon Hausmann Ste

[PATCH v3 13/32] tag: add repository argument to lookup_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 --- builtin/describe.c | 6 +++--- builtin/pack-objects.c | 2 +- builtin/replace.c | 2 +- log-tree.c | 2 +- object.c | 2 +- sha1

[PATCH v3 07/32] commit: add repository argument to lookup_commit_reference_gently

2018-06-28 Thread Stefan Beller
a macro to catch callers passing a repository other than the_repository at compile time. Signed-off-by: Stefan Beller --- archive.c | 2 +- blame.c | 3 ++- builtin/checkout.c| 6 +++--- builtin/describe.c| 5 +++-- builtin/fetch.c | 9 ++--- builtin

[PATCH v3 09/32] commit: add repository argument to lookup_commit

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

[PATCH v3 27/32] commit.c: allow get_cached_commit_buffer to handle arbitrary repositories

2018-06-28 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 dd8c9c15b14..15b044331a1 100644 --- a/commit.c +++ b/commit.c @@ -283,10 +283,10 @@ void set_commit_buffer(struct repository *r, struct

[PATCH v3 26/32] commit.c: allow set_commit_buffer to handle arbitrary repositories

2018-06-28 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 1baac77861f..dd8c9c15b14 100644 --- a/commit.c +++ b/commit.c @@ -275,10 +275,10 @@ void free_commit_buffer_slab(struct buffer_slab *bs

[PATCH v3 31/32] commit.c: allow lookup_commit_reference_gently to handle arbitrary repositories

2018-06-28 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 15b044331a1..08b4602f43f 100644 --- a/commit.c +++ b/commit.c @@ -24,16 +24,16 @@ int save_commit_buffer = 1; const char

[PATCH v3 29/32] object.c: allow parse_object to handle arbitrary repositories

2018-06-28 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 cd870fee22b..b0faab85d40 100644 --- a/object.c +++ b/object.c @@ -245,28 +245,28 @@ struct object *parse_object_or_die(const

[PATCH v3 32/32] commit.c: allow lookup_commit_reference to handle arbitrary repositories

2018-06-28 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 08b4602f43f..b88ced5b026 100644 --- a/commit.c +++ b/commit.c @@ -36,9 +36,9 @@ struct commit *lookup_commit_reference_gently(struct

[PATCH v3 30/32] tag.c: allow deref_tag to handle arbitrary repositories

2018-06-28 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 v3 28/32] object.c: allow parse_object_buffer to handle arbitrary repositories

2018-06-28 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 9d588448192..cd870fee22b 100644 --- a/object.c +++ b/object.c @@ -185,21 +185,21 @@ struct object

[PATCH v3 22/32] tag: allow parse_tag_buffer 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 46b5882ee12..682e7793059 100644 --- a/tag.c +++ b/tag.c @@ -126,7 +126,7 @@ void release_tag_memory(struct tag *t) t->date

[PATCH v3 23/32] commit.c: allow parse_commit_buffer 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 8749e151451..41d23352098 100644 --- a/commit.c +++ b/commit.c @@ -364,7 +364,7 @@ const void *detach_commit_buffer(struct commit

[PATCH v3 24/32] commit-slabs: remove realloc counter outside of slab struct

2018-06-28 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

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