[PATCH] Documentation/diff-options: explain different diff algorithms

2018-08-10 Thread Stefan Beller
As a user I wondered what the diff algorithms are about. Offer at least a basic explanation on the differences of the diff algorithms. Signed-off-by: Stefan Beller --- Not sure if this is finished, I just want to put out the state that I have sitting on my disk. Documentation/diff

Re: [PATCH 6/7] submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree

2018-08-10 Thread Stefan Beller
> > + cfg_file = xstrfmt("%s/config", subrepo.gitdir); > > As I mentioned here: > https://public-inbox.org/git/20180807230637.247200-1-bmw...@google.com/T/#t > > This lines should probably be more like: > > cfg_file = repo_git_path(, "config"); > Why? You did not mention the

[PATCH 2/2] WIP range-diff: print some statistics about the range

2018-08-09 Thread Stefan Beller
Signed-off-by: Stefan Beller --- range-diff.c | 9 + 1 file changed, 9 insertions(+) diff --git a/range-diff.c b/range-diff.c index a977289b7dc..fbabce5f91f 100644 --- a/range-diff.c +++ b/range-diff.c @@ -264,6 +264,8 @@ static void get_correspondences(struct string_list *a, struct

[PATCH 0/2] Getting data on different diff algorithms WAS: Documentation/diff-options: explain different diff algorithms

2018-08-09 Thread Stefan Beller
difference to expect from the diff algorithms. I have not yet dug into the quality of the diffs. Stefan Stefan Beller (2): WIP: range-diff: take extra arguments for different diffs. WIP range-diff: print some statistics about the range range-diff.c | 29 + 1 file changed

[PATCH 1/2] WIP: range-diff: take extra arguments for different diffs.

2018-08-09 Thread Stefan Beller
We can use the range-diff on the same range to examine differences in the diff algorithm. Signed-off-by: Stefan Beller --- range-diff.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/range-diff.c b/range-diff.c index 347b4a79f25..a977289b7dc 100644

Re: [PATCH 02/10] string-list.h: add string_list_pop function.

2018-08-09 Thread Stefan Beller
On Thu, Aug 9, 2018 at 2:56 PM Jeff King wrote: > > I think you could have helpers to spell the two lines above even more > nicely: > > while (list->nr) { > work_on(list_top(list)); > list_pop(list); /* note this doesn't return anything! */ > } > > But yes, it's not possible

Re: [PATCH 02/10] string-list.h: add string_list_pop function.

2018-08-09 Thread Stefan Beller
On Thu, Aug 9, 2018 at 2:41 PM Jeff King wrote: > > > > while (list->nr) > > work_on(list_pop(list)); > > > > which is not so bad. > > In many cases you can just do: > > while (list->nr) { > work_on(list->items[list->nr - 1]); > list_remove(list, list->nr -

Re: [PATCH 01/10] string_list: print_string_list to use trace_printf

2018-08-09 Thread Stefan Beller
On Thu, Aug 9, 2018 at 2:16 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > It is a debugging aid, so it should print to the debugging channel. > > Who says? The comment in the header file? /** * Dump a string_list to stdout, useful mainly for debugging *

Re: [PATCH] Documentation/diff-options: explain different diff algorithms

2018-08-09 Thread Stefan Beller
On Mon, Aug 6, 2018 at 4:18 PM Jonathan Nieder wrote: > > +DIFF ALGORITHMS > > +--- > > Please add some introductory words about what the headings refer to. ok. > > > +the shortest output. > > Trivia: the `minimal` variant of Myers doesn't guarantee shortest > output, either: what

Re: [PATCH] Documentation/diff-options: explain different diff algorithms

2018-08-09 Thread Stefan Beller
On Tue, Aug 7, 2018 at 8:56 AM Junio C Hamano wrote: > > Jonathan Nieder writes: > > > Both don't seem quite right, since they have an extra space before the > > period. The git-diff(1) seems especially not quite right --- does it > > intend to say something like "See the DIFF ALGORITHMS

Re: [PATCH 10/10] fetch: retry fetching submodules if sha1 were not fetched

2018-08-09 Thread Stefan Beller
On Thu, Aug 9, 2018 at 12:50 AM Martin Ågren wrote: > > On 9 August 2018 at 00:17, Stefan Beller wrote: > > Currently when git-fetch is asked to recurse into submodules, it dispatches > > a plain "git-fetch -C " (and some submodule related options > > su

Re: [PATCH 03/10] sha1-array: provide oid_array_remove_if

2018-08-09 Thread Stefan Beller
On Thu, Aug 9, 2018 at 12:39 AM Martin Ågren wrote: > > On 9 August 2018 at 00:17, Stefan Beller wrote: > > +int oid_array_remove_if(struct oid_array *array, > > + for_each_oid_fn fn, > > + void *data) > > +{ > >

Re: [PATCH 1/2] submodule: create helper to build paths to submodule gitdirs

2018-08-08 Thread Stefan Beller
On Wed, Aug 8, 2018 at 3:33 PM Brandon Williams wrote: > > Introduce a helper function "submodule_name_to_gitdir()" (and the > submodule--helper subcommand "gitdir") which constructs a path to a > submodule's gitdir, located in the provided repository's "modules" > directory. Makes sense. > >

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

2018-08-08 Thread Stefan Beller
t be found. Note: This is an RFC and 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'. Signed-off-by: Stefan Beller --- built

[PATCH 09/10] submodule: fetch in submodules git directory instead of in worktree

2018-08-08 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 21757e32908..ec7ea6f8c2d 100644

[PATCH 07/10] submodule: move global changed_submodule_names into fetch submodule struct

2018-08-08 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 08/10] submodule.c: do not copy around submodule list

2018-08-08 Thread Stefan Beller
have access to the util pointer for longer that contains the commits that we need to fetch. Signed-off-by: Stefan Beller --- submodule.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/submodule.c b/submodule.c index 92988239f6b..21757e32908 100644

[PATCH 05/10] submodule.c: fix indentation

2018-08-08 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 | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/submodule.c b/submodule.c index 5b4e5227d90..bceeba13217 100644

[PATCH 04/10] submodule.c: convert submodule_move_head new argument to object id

2018-08-08 Thread Stefan Beller
All callers use oid_to_hex to convert the desired oid to a string before calling submodule_move_head. Defer the conversion to the submodule_move_head as it will turn out to be useful in a bit. Signed-off-by: Stefan Beller --- entry.c| 6 +++--- submodule.c| 12

[PATCH 03/10] sha1-array: provide oid_array_remove_if

2018-08-08 Thread Stefan Beller
Signed-off-by: Stefan Beller --- sha1-array.c | 39 +++ sha1-array.h | 3 +++ 2 files changed, 42 insertions(+) diff --git a/sha1-array.c b/sha1-array.c index 265941fbf40..10eb08b425e 100644 --- a/sha1-array.c +++ b/sha1-array.c @@ -77,3 +77,42 @@ int

[PATCH 06/10] submodule.c: sort changed_submodule_names before searching it

2018-08-08 Thread Stefan Beller
pretty well already, so let's just do the sort afterwards. Signed-off-by: Stefan Beller --- submodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/submodule.c b/submodule.c index bceeba13217..89a46b8af50 100644 --- a/submodule.c +++ b/submodule.c @@ -1255,7 +1255,7

[PATCH 01/10] string_list: print_string_list to use trace_printf

2018-08-08 Thread Stefan Beller
It is a debugging aid, so it should print to the debugging channel. Signed-off-by: Stefan Beller --- string-list.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/string-list.c b/string-list.c index 771c4550980..9f651bb4294 100644 --- a/string-list.c +++ b/string-list.c

[PATCH 02/10] string-list.h: add string_list_pop function.

2018-08-08 Thread Stefan Beller
A string list can be used as a stack, but should we? A later patch shows how useful this will be. Signed-off-by: Stefan Beller --- string-list.c | 8 string-list.h | 6 ++ 2 files changed, 14 insertions(+) diff --git a/string-list.c b/string-list.c index 9f651bb4294..ea80afc8a0c

[RFC PATCH 00/10] fetch: make sure submodule oids are fetched

2018-08-08 Thread Stefan Beller
ll in some workflows, not so well in others, which this series aims to fix. The first patches provide new basic functionality and do some refactoring; the interesting part is in the two last patches. Thanks, Stefan Stefan Beller (10): string_list: print_string_list to use trace_printf string-l

[PATCH 2/3] config: fix case sensitive subsection names on writing

2018-08-08 Thread Stefan Beller
he resulting setting for the old style config differs from the configuration. That will be fixed in a follow up patch. Reported-by: JP Sugarbroad Signed-off-by: Stefan Beller --- config.c | 12 +++- t/t1300-config.sh | 1 + 2 files changed, 12 insertions(+), 1 deletion(-)

[PATCH 1/3] t1300: document current behavior of setting options

2018-08-08 Thread Stefan Beller
This documents current behavior of the config machinery, when changing the value of some settings. This patch just serves to provide a baseline for the follow up that will fix some issues with the current behavior. Signed-off-by: Stefan Beller --- t/t1300-config.sh | 86

[PATCH 3/3] git-config: document accidental multi-line setting in deprecated syntax

2018-08-08 Thread Stefan Beller
occurrence of 'key'. As the syntax is deprecated, let's prefer to not spend time on fixing the behavior and just document it instead. Signed-off-by: Stefan Beller --- Documentation/git-config.txt | 21 + 1 file changed, 21 insertions(+) diff --git a/Documentation/git-config.txt b

[PATCH 0/3] Resending sb/config-write-fix

2018-08-08 Thread Stefan Beller
This is a resend of sb/config-write-fix, with a slightly better commit message and a renamed variable. Thanks, Stefan Stefan Beller (3): t1300: document current behavior of setting options config: fix case sensitive subsection names on writing git-config: document accidental multi-line

Re: [PATCH 09/11] builtin rebase: start a new rebase only if none is in progress

2018-08-08 Thread Stefan Beller
On Wed, Aug 8, 2018 at 6:51 AM Pratik Karki wrote: > > To run a new rebase, there needs to be a check to assure that no other > rebase is in progress. New rebase operation cannot start until an > ongoing rebase operation completes or is terminated. > > Signed-off-by: Pratik Karki > --- >

Re: [PATCH 08/11] builtin rebase: support --force-rebase

2018-08-08 Thread Stefan Beller
On Wed, Aug 8, 2018 at 6:51 AM Pratik Karki wrote: > @@ -551,10 +560,21 @@ int cmd_rebase(int argc, const char **argv, const char > *prefix) [...] > ; /* be quiet */ > else if (!strcmp(branch_name, "HEAD") && > -

Re: [PATCH 04/11] builtin rebase: support --quiet

2018-08-08 Thread Stefan Beller
On Wed, Aug 8, 2018 at 6:51 AM Pratik Karki wrote: > > This commit introduces a rebase option `--quiet`. While `--quiet` is > commonly perceived as opposite to `--verbose`, this is not the case for > the rebase command: both `--quiet` and `--verbose` default to `false` if > neither `--quiet` nor

Re: [PATCH v4 00/21] Add `range-diff`, a `tbdiff` lookalike

2018-08-08 Thread Stefan Beller
On Wed, Aug 8, 2018 at 6:05 AM Johannes Schindelin wrote: > > [...] > > > diff --git a/Makefile b/Makefile > > > --- a/Makefile > > > +++ b/Makefile > > > > The line starting with --- is red (default removed color) and the line > > with +++ is green (default add color). > > > >

[PATCH] Documentation/diff-options: explain different diff algorithms

2018-08-06 Thread Stefan Beller
As a user I wondered what the diff algorithms are about. Offer at least a basic explanation on the differences of the diff algorithms. Signed-off-by: Stefan Beller --- Documentation/diff-options.txt | 10 +++--- Documentation/git-diff.txt | 34 ++ 2 files

Re: [PATCH] Makefile: enable DEVELOPER by default

2018-08-06 Thread Stefan Beller
> I had the impression that DEVELOPER=1 was allowed to set flags that old > versions might not even know about. Hence they might actually barf, even > without -Werror. Maybe that's better since the introduction of the > detect-compiler script, though. > > I do think we may have a skewed view of

Re: [RFC PATCH v2 06/12] submodule--helper: add a '--stage' option to the 'config' sub command

2018-08-06 Thread Stefan Beller
> The consistency I was referring to is merely in the mechanism used to > deal with .gitmodules: by always using "submodule--helper config". > > As a side argument: in some previous discussion Stefan mentioned the > possibility that, in the future, he may be interested to explore > different

Re: [RFC PATCH 7/7] diff/am: enhance diff format to use */~ for moved lines

2018-08-06 Thread Stefan Beller
On Sat, Aug 4, 2018 at 10:15 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > Try it out via > > ./git-format-patch --mark-moved 15ef69314d^..15ef69314d > > to see if you like it. > > > > This separates the coloring decision from the detection

Re: [PATCH 0/7] improve range-diffs coloring and [RFC] move detection

2018-08-06 Thread Stefan Beller
On Sat, Aug 4, 2018 at 9:57 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > This builds on top of sb/range-diff-colors, which builds on js/range-diff. > > As another round of js/range-diff is expected, according to > > Oh right. I forgot to mentio

Re: [PATCH] config.txt: reorder blame stuff to keep config keys sorted

2018-08-05 Thread Stefan Beller
> > Signed-off-by: Nguyễn Thái Ngọc Duy FWIW: Acked-by: Stefan Beller Are there more hidden sorts in the config.txt that I am not aware of? Thanks for writing this patch! Stefan

[PATCH] Makefile: enable DEVELOPER by default

2018-08-03 Thread Stefan Beller
to turn off this flag. (Also they are fewer than the number of new contributors) Signed-off-by: Stefan Beller --- Resending with cc'd. Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 41b93689add..95aa3ff3185 100644 --- a/Makefile +++ b/Makefile @@ -497,6

[PATCH] Makefile: enable DEVELOPER by default

2018-08-03 Thread Stefan Beller
to turn off this flag. (Also they are fewer than the number of new contributors) Signed-off-by: Stefan Beller --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 41b93689add..95aa3ff3185 100644 --- a/Makefile +++ b/Makefile @@ -497,6 +497,8 @@ ALL_CFLAGS

[RFC PATCH 7/7] diff/am: enhance diff format to use */~ for moved lines

2018-08-03 Thread Stefan Beller
. git-apply and git-am will also accept these patches by rewriting those signs back to +/-. Signed-off-by: Stefan Beller --- apply.c | 12 diff.c | 21 + diff.h | 5 - 3 files changed, 37 insertions(+), 1 deletion(-) diff --git a/apply.c b/apply.c index

[PATCH 2/7] diff.c: add --output-indicator-{new, old, context}

2018-08-03 Thread Stefan Beller
moved lines with lines other than +/-. Signed-off-by: Stefan Beller --- diff.c | 21 + diff.h | 5 + 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/diff.c b/diff.c index 57a8a38755e..2e711809700 100644 --- a/diff.c +++ b/diff.c @@ -1032,7 +1032,7 @@ static

[PATCH 5/7] diff.c: rename color_moved to markup_moved

2018-08-03 Thread Stefan Beller
This just renames a variable to make the next patch easier to review. Signed-off-by: Stefan Beller --- diff.c | 28 ++-- diff.h | 2 +- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/diff.c b/diff.c index 2e711809700..d3829c7d086 100644 --- a/diff.c

[PATCH 0/7] improve range-diffs coloring and [RFC] move detection

2018-08-03 Thread Stefan Beller
ks, Stefan Stefan Beller (7): diff.c: emit_line_0 to take string instead of first sign diff.c: add --output-indicator-{new, old, context} range-diff: make use of different output indicators range-diff: indent special lines as context diff.c: rename color_moved to markup_moved diff

[PATCH 3/7] range-diff: make use of different output indicators

2018-08-03 Thread Stefan Beller
This change itself only changes the internal communication and should have no visible effect to the user. We instruct the diff code that produces the inner diffs to use X, Y, Z instead of the usual markers for new, old and context lines Signed-off-by: Stefan Beller --- range-diff.c | 15

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

2018-08-03 Thread Stefan Beller
/git Signed-off-by: Stefan Beller --- range-diff.c | 2 ++ t/t3206-range-diff.sh | 12 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/range-diff.c b/range-diff.c index a4ff945427e..91d5f12180d 100644 --- a/range-diff.c +++ b/range-diff.c @@ -85,6 +85,7

[PATCH 1/7] diff.c: emit_line_0 to take string instead of first sign

2018-08-03 Thread Stefan Beller
By providing a string as the first part of the emission we can extend it later more easily. While at it, document emit_line_0. Signed-off-by: Stefan Beller --- diff.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/diff.c b/diff.c index

[PATCH 6/7] diff.c: factor determine_line_color out of emit_diff_symbol_from_struct

2018-08-03 Thread Stefan Beller
Factoring out code that determines color for both the new and old code even saves some lines, though minuscule. However we introduce an offset computation in the color array. Signed-off-by: Stefan Beller --- diff.c | 88 +- 1 file changed

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

2018-08-03 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 Signed-off-by: Junio C Hamano --- builtin/submodule--helper.c | 37 +++-- 1 file changed, 27 insertions(+), 10

[PATCH 6/7] submodule--helper: replace connect-gitdir-workingtree by ensure-core-worktree

2018-08-03 Thread Stefan Beller
in a follow up patch, as we do not need the 'name' in shell now. Signed-off-by: Stefan Beller --- builtin/submodule--helper.c | 64 +++-- git-submodule.sh| 7 ++-- 2 files changed, 42 insertions(+), 29 deletions(-) diff --git a/builtin/submodule--helper.c

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

2018-08-03 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 Signed

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

2018-08-03 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 Signed-off-by: Junio C Hamano --- git-submodule.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git

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

2018-08-03 Thread Stefan Beller
In a later patch we'll find this method handy. Signed-off-by: Stefan Beller Signed-off-by: Junio C Hamano --- 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

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

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

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

2018-08-03 Thread Stefan Beller
e-worktree Thanks, Stefan Stefan Beller (7): git-submodule.sh: align error reporting for update mode to use path git-submodule.sh: rename unused variables builtin/submodule--helper: factor out submodule updating builtin/submodule--helper: store update_clone information in a struct builtin

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

2018-08-03 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 Signed-off-by: Junio C Hamano --- builtin/submodule--helper.c | 59

Re: What's cooking in git.git (Aug 2018, #01; Thu, 2)

2018-08-03 Thread Stefan Beller
On Fri, Aug 3, 2018 at 1:07 PM Junio C Hamano wrote: > > Brandon Williams writes: > > > [1] > > https://public-inbox.org/git/cagz79kygs4dvoetygx01cinrxxlcqgxovsplhmgyz8b51lz...@mail.gmail.com/ > > This mail seems to counter that indicating that the "What's Cooking" > > emails should not be used

[PATCH 0/3] Reroll of sb/config-write-fix

2018-08-02 Thread Stefan Beller
/20180801193413.146994-1-sbel...@google.com/ Stefan Beller (3): t1300: document current behavior of setting options config: fix case sensitive subsection names on writing git-config: document accidental multi-line setting in deprecated syntax Documentation/git-config.txt | 21 + config.c

[PATCH 3/3] git-config: document accidental multi-line setting in deprecated syntax

2018-08-02 Thread Stefan Beller
occurrence of 'key'. As the syntax is deprecated, let's prefer to not spend time on fixing the behavior and just document it instead. Signed-off-by: Stefan Beller --- Documentation/git-config.txt | 21 + 1 file changed, 21 insertions(+) diff --git a/Documentation/git-config.txt b

[PATCH 2/3] config: fix case sensitive subsection names on writing

2018-08-02 Thread Stefan Beller
he resulting setting for the old style config differs from the configuration. That will be fixed in a follow up patch. Reported-by: JP Sugarbroad Signed-off-by: Stefan Beller --- config.c | 12 +++- t/t1300-config.sh | 1 + 2 files changed, 12 insertions(+), 1 deletion(-)

[PATCH 1/3] t1300: document current behavior of setting options

2018-08-02 Thread Stefan Beller
This documents current behavior of the config machinery, when changing the value of some settings. This patch just serves to provide a baseline for the follow up that will fix some issues with the current behavior. Signed-off-by: Stefan Beller --- t/t1300-config.sh | 86

Re: [PATCH 2/3] config: fix case sensitive subsection names on writing

2018-08-02 Thread Stefan Beller
On Wed, Aug 1, 2018 at 3:51 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > A use reported a submodule issue regarding strange case indentation > > issues, but it could be boiled down to the following test case: > > Perhaps > > s/use/user/ > s/ca

Re: What's cooking in git.git (Aug 2018, #01; Thu, 2)

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 4:02 PM Junio C Hamano wrote: > * sb/config-write-fix (2018-08-01) 3 commits > - git-config: document accidental multi-line setting in deprecated syntax > - config: fix case sensitive subsection names on writing > - t1300: document current behavior of setting options >

Re: [PATCH v4 9/9] Documentation/config: add odb..promisorRemote

2018-08-02 Thread Stefan Beller
On Wed, Aug 1, 2018 at 11:16 PM Christian Couder wrote: > > From: Christian Couder > > Signed-off-by: Junio C Hamano > --- > Documentation/config.txt | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/Documentation/config.txt b/Documentation/config.txt > index 43b2de7b5f..2d048d47f2

Re: [PATCH] sha1dc: update from upstream

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 1:51 PM Ævar Arnfjörð Bjarmason wrote: > diff --git a/sha1collisiondetection b/sha1collisiondetection > index 19d97bf5af..232357eb2e 16 > --- a/sha1collisiondetection > +++ b/sha1collisiondetection > @@ -1 +1 @@ > -Subproject commit

Re: [RFC PATCH v2 12/12] submodule: remove the .gitmodules file when it is empty

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > In particular this makes it possible to really clean things up when > removing the last submodule with "git rm". This sentence is a continuation of the subject line, and I had to reread it to follow along. > > The rationale is that if git

Re: [RFC PATCH v2 11/12] dir: move is_empty_file() from builtin/am.c to dir.c and make it public

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > The is_empty_file() function can be generally useful, move it to dir.c > and make it public. > > Signed-off-by: Antonio Ospite Makes sense, Thanks, Stefan > +++ b/dir.c > @@ -2412,6 +2412,22 @@ int is_empty_dir(const char *path) >

Re: [RFC PATCH v2 10/12] t7416: add new test about HEAD:.gitmodules and not existing .gitmodules

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > git submodule commands can now access .gitmodules from the current > branch even when it's not in the working tree, add some tests for that > scenario. > > Signed-off-by: Antonio Ospite > --- > > For the test files I used the most used

Re: [RFC PATCH v2 09/12] submodule: support reading .gitmodules even when it's not checked out

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > When the .gitmodules file is not available in the working tree, try > using HEAD:.gitmodules from the current branch. This covers the case > when the file is part of the repository but for some reason it is not > checked out, for example

Re: [RFC PATCH v2 08/12] t7506: cleanup .gitmodules properly before setting up new scenario

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > In t/t7506-status-submodule.sh at some point a new scenario is set up to > test different things, in particular new submodules are added which are > meant to completely replace the previous ones. > > However before calling the "git

Re: [RFC PATCH v2 05/12] submodule: use the 'submodule--helper config' command

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > Use the 'submodule--helper config' command in git-submodules.sh to avoid > referring explicitly to .gitmodules by the hardcoded file path. ccol! This is the corner stone to the work of the previous patches. Nicely done! > This makes it

Re: [RFC PATCH v2 04/12] submodule--helper: add a new 'config' subcommand

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > Add a new 'config' subcommand to 'submodule--helper', this extra level > of indirection makes it possible to add some flexibility to how the > submodules configuration is handled. > > Signed-off-by: Antonio Ospite > --- > > Note that the

Re: [RFC PATCH v2 03/12] t7411: be nicer to future tests and really clean things up

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 9:41 AM SZEDER Gábor wrote: > > > Tests 5 and 8 in t/t7411-submodule-config.sh add two commits with > > invalid lines in .gitmodules but then only the second commit is removed. > > > > This may affect future subsequent tests if they assume that the > > .gitmodules file has

Re: [RFC PATCH v2 01/12] submodule: add a print_config_from_gitmodules() helper

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 6:47 AM Antonio Ospite wrote: > > This will be used to print values just like "git config -f .gitmodules" > would. > > Signed-off-by: Antonio Ospite > --- > submodule-config.c | 25 + > submodule-config.h | 2 ++ > 2 files changed, 27

Re: [PATCH 2/2] Highlight keywords in remote sideband output.

2018-08-02 Thread Stefan Beller
On Thu, Aug 2, 2018 at 10:37 AM Eric Sunshine wrote: > > On Thu, Aug 2, 2018 at 7:46 AM Han-Wen Nienhuys wrote: > > Sure. My doubt is that it's hard to tell what the state of my patch is > > at any given time. > > Understandable. Junio sends out a periodic "What's cooking" email > summarizing

Re: [PATCHv2 0/8] Add color test for range-diff, simplify diff.c

2018-08-01 Thread Stefan Beller
On Wed, Aug 1, 2018 at 12:13 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > Stefan Beller (8): > > test_decode_color: understand FAINT and ITALIC > > t3206: add color test for range-diff --dual-color > > diff.c: simplify caller of emit_line_

[PATCH 2/3] config: fix case sensitive subsection names on writing

2018-08-01 Thread Stefan Beller
secmp'; although the resulting setting for the old style config differs from the configuration. That will be fixed in a follow up patch. Reported-by: JP Sugarbroad Signed-off-by: Stefan Beller --- config.c | 12 +++- t/t1300-config.sh | 1 + 2 files changed, 12 insertions(+),

[PATCH 0/3] sb/config-write-fix done without robbing Peter

2018-08-01 Thread Stefan Beller
The first patch stands as is unchanged, and the second and third patch are different enough that range-diff doesn't want to show a diff. Thanks, Stefan Stefan Beller (3): t1300: document current behavior of setting options config: fix case sensitive subsection names on writing git-config: document

[PATCH 1/3] t1300: document current behavior of setting options

2018-08-01 Thread Stefan Beller
This documents current behavior of the config machinery, when changing the value of some settings. This patch just serves to provide a baseline for the follow up that will fix some issues with the current behavior. Signed-off-by: Stefan Beller --- t/t1300-config.sh | 86

[PATCH 3/3] git-config: document accidental multi-line setting in deprecated syntax

2018-08-01 Thread Stefan Beller
occurrence of 'key'. As the syntax is deprecated, let's prefer to not spend time on fixing the behavior and just document it instead. Signed-off-by: Stefan Beller --- Documentation/git-config.txt | 21 + 1 file changed, 21 insertions(+) diff --git a/Documentation/git-config.txt b

Re: [PATCH 2/2] refs: switch for_each_replace_ref back to use a ref_store

2018-07-30 Thread Stefan Beller
On Mon, Jul 30, 2018 at 5:19 PM Jonathan Tan wrote: > > > So let's go back to the clean API, just requiring a ref_store as an > > argument. > > Here, you say that we want ref_store as an argument... I do. > > > -int for_each_replace_ref(struct repository *r, each_ref_fn fn, void > > *cb_data)

[PATCH 8/8] diff.c: rewrite emit_line_0 more understandably

2018-07-30 Thread Stefan Beller
we ignore it). Signed-off-by: Stefan Beller --- diff.c | 73 +- 1 file changed, 41 insertions(+), 32 deletions(-) diff --git a/diff.c b/diff.c index f565a2c0c2b..2bd4d3d6839 100644 --- a/diff.c +++ b/diff.c @@ -580,43 +580,52 @@ s

[PATCH 5/8] diff.c: add set_sign to emit_line_0

2018-07-30 Thread Stefan Beller
. Signed-off-by: Stefan Beller --- diff.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/diff.c b/diff.c index 8fd2171d808..a36ed92c54c 100644 --- a/diff.c +++ b/diff.c @@ -576,7 +576,7 @@ static void check_blank_at_eof(mmfile_t *mf1, mmfile_t *mf2

[PATCH 6/8] diff: use emit_line_0 once per line

2018-07-30 Thread Stefan Beller
All lines that use emit_line_0 multiple times per line, are combined into a single call to emit_line_0, making use of the 'set' argument. Signed-off-by: Stefan Beller --- diff.c | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/diff.c b/diff.c

[PATCH 7/8] diff.c: compute reverse locally in emit_line_0

2018-07-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- diff.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/diff.c b/diff.c index fdad7ffdd77..f565a2c0c2b 100644 --- a/diff.c +++ b/diff.c @@ -576,11 +576,12 @@ static void check_blank_at_eof(mmfile_t *mf1, mmfile_t *mf2

[PATCH 4/8] diff.c: reorder arguments for emit_line_ws_markup

2018-07-30 Thread Stefan Beller
The order shall be all colors first, then the content, flags at the end. The colors are in order. Signed-off-by: Stefan Beller --- diff.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/diff.c b/diff.c index f7251c89cbb..8fd2171d808 100644 --- a/diff.c +++ b

[PATCH 1/8] test_decode_color: understand FAINT and ITALIC

2018-07-30 Thread Stefan Beller
Signed-off-by: Stefan Beller --- t/test-lib-functions.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 2b2181dca09..be8244c47b5 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -42,6 +42,8 @@ test_decode_color

[PATCH 2/8] t3206: add color test for range-diff --dual-color

2018-07-30 Thread Stefan Beller
The 'expect'ed outcome has been taken by running the 'range-diff | decode'. Signed-off-by: Stefan Beller --- t/t3206-range-diff.sh | 39 +++ 1 file changed, 39 insertions(+) diff --git a/t/t3206-range-diff.sh b/t/t3206-range-diff.sh index 2237c7f4af9

[PATCHv2 0/8] Add color test for range-diff, simplify diff.c

2018-07-30 Thread Stefan Beller
addressed all of Erics feedback: * reworded commit messages * dropped q_to_tab and use cat instead * use -\EOF isntead of -EOF Thanks, Stefan Stefan Beller (8): test_decode_color: understand FAINT and ITALIC t3206: add color test for range-diff --dual-color diff.c: simplify caller

Re: [PATCH v4 11/21] range-diff: add tests

2018-07-30 Thread Stefan Beller
On Mon, Jul 30, 2018 at 1:18 PM Junio C Hamano wrote: > > I already pushed an update to https://github.com/gitgitgadget/git/pull/1. > > Should I take "pushed to ... GGG" to mean "do not merge what you > have to 'next' yet, as there will be an updated series (not > incremental) being prepared"?

[PATCH 1/3] t1300: document current behavior of setting options

2018-07-30 Thread Stefan Beller
This documents current behavior of the config machinery, when changing the value of some settings. This patch just serves to provide a baseline for the follow up that will fix some issues with the current behavior. Signed-off-by: Stefan Beller --- t/t1300-config.sh | 86

[PATCH 3/3] config: treat section case insensitive in store_aux_event

2018-07-30 Thread Stefan Beller
This is a no-op because the section names are lower-cased already in get_base_var, this is purely for demonstration that we do not need to care about case issues in this part of the code. Signed-off-by: Stefan Beller --- config.c | 16 +++- 1 file changed, 15 insertions(+), 1

[PATCH 2/3] config: fix case sensitive subsection names on writing

2018-07-30 Thread Stefan Beller
make use of the config parser's event stream, 2018-04-09) Make the subsection case sensitive and provide a test for writing. The test for reading is just above this test. Reported-by: JP Sugarbroad Signed-off-by: Stefan Beller --- config.c | 2 +- t/t1300-config.sh | 3 +++ 2 files changed

[PATCH 0/3] config: fix case sensitive subsection names on writing

2018-07-30 Thread Stefan Beller
f what is happening. I suggest to drop the last patch and only take the first two, or if we decide we want to be fully correct, we'd want to discuss how to make it happen. (where to store the information that we are dealing with an old notation) Thanks, Stefan Stefan Beller (3): t1300: docume

[PATCH 2/2] refs: switch for_each_replace_ref back to use a ref_store

2018-07-30 Thread Stefan Beller
need a repository (for e.g. lookup_commit or friends), you'll have to pass it through the callback cookie, whether directly or as part of a struct tailored to your purpose. So let's go back to the clean API, just requiring a ref_store as an argument. Signed-off-by: Stefan Beller --- builtin

Re: [PATCH 2/8] t3206: add color test for range-diff --dual-color

2018-07-30 Thread Stefan Beller
On Fri, Jul 27, 2018 at 11:28 PM Eric Sunshine wrote: > > On Fri, Jul 27, 2018 at 11:05 PM Stefan Beller wrote: > > The 'expect'ed outcome is taken by running the 'range-diff |decode'; > > it is not meant as guidance, rather as a documentation of the current > > situa

[PATCH 0/2] Cleanup refs API [WAS: Re: [PATCH 2/3] refs: introduce new API, wrap old API shallowly around new API]

2018-07-30 Thread Stefan Beller
-objects: use arbitrary repositories Stefan Beller (1): refs: switch for_each_replace_ref back to use a ref_store builtin/replace.c | 4 +--- refs.c| 4 ++-- refs.h| 2 +- replace-object.c | 5 +++-- 4 files changed, 7 insertions(+), 8 deletions(-) -- 2.18.0.132.g195c49a2227

[PATCH 1/2] replace-objects: use arbitrary repositories

2018-07-30 Thread Stefan Beller
. So instead let's just pass the repository as a cb cookie and cleanup the API in follow up patches] Signed-off-by: Derrick Stolee Signed-off-by: Stefan Beller --- replace-object.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/replace-object.c b/replace-object.c index

Re: [PATCH] doc: fix want-capability separator

2018-07-30 Thread Stefan Beller
On Sat, Jul 28, 2018 at 2:16 PM Masaya Suzuki wrote: > Signed-off-by: Masaya Suzuki The email addresses mismatch? > Unlike ref advertisement, client capabilities and the first want are > separated by SP, not NUL, in the implementation. Fix the documentation > to align with the implementation.

Re: [PATCH/RFC] Color merge conflicts

2018-07-30 Thread Stefan Beller
On Mon, Jul 30, 2018 at 9:00 AM Nguyễn Thái Ngọc Duy wrote: > > One of the things I notice when watching a normal git user face a > merge conflicts is the output is very verbose (especially when there > are multiple conflicts) and it's hard to spot the important parts to > start resolving

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