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

2018-07-27 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 8/8] diff.c: rewrite emit_line_0 more understandably

2018-07-27 Thread Stefan Beller
, in which case 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

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

2018-07-27 Thread Stefan Beller
-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, } static void

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

2018-07-27 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 4/8] diff.c: reorder arguments for emit_line_ws_markup

2018-07-27 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 3/8] diff.c: simplify caller of emit_line_0

2018-07-27 Thread Stefan Beller
Due to the previous condition we know "set_sign != NULL" at that point. Signed-off-by: Stefan Beller --- diff.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/diff.c b/diff.c index 272b0b93834..f7251c89cbb 100644 --- a/diff.c +++ b/diff.c @@ -997,8 +997,7 @@ s

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

2018-07-27 Thread Stefan Beller
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 situation. Signed-off-by: Stefan Beller --- t/t3206-range-diff.sh | 39 +++ 1 file changed, 39 insertions(+) diff --git

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

2018-07-27 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 0/8] Add color test for range-diff, simplify diff.c

2018-07-27 Thread Stefan Beller
further bit more (by e.g. cherry-picking "ws: do not reset and set color twice" found at [1]), but that would be feature work. This series doesn't change any existing tests! [1] https://github.com/stefanbeller/git/tree/ws_cleanup-ontop-range-diff Thanks, Stefan Stefan

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

2018-07-27 Thread Stefan Beller
I cc'd the wrong peff. Sorry about that. On Fri, Jul 27, 2018 at 4:36 PM Stefan Beller wrote:

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

2018-07-27 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 --- I really appreciate the work by DScho (and Peff as I recall him as an

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

2018-07-27 Thread Stefan Beller
On Fri, Jul 27, 2018 at 2:39 PM Junio C Hamano wrote: > > Brandon Williams writes: > > > Either way you're probably going to need to be careful about how you do > > string comparison against the different parts. > > Good suggestion. The suggestion is a rabit hole and was a waste of time.

[PATCH] xdiff: reduce indent heuristic overhead

2018-07-27 Thread Stefan Beller
he constant as that fits more than a screen, which really means that the diff sliding is probably not providing a lot of benefit anyway. [1] https://public-inbox.org/git/72ac1ac2-f567-f241-41d6-d0f83072e...@alum.mit.edu/ Reported-by: Jun Wu Analysis-by: Michael Haggerty Signed-off-by: Stefan Be

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

2018-07-27 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 both reading and writing. Reported-by: JP Sugarbroad Signed-off-by: Stefan Beller --- config.c | 2 +- t/t1300-config.sh | 18 ++ 2 files changed, 19 in

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

2018-07-27 Thread Stefan Beller
On Fri, Jul 27, 2018 at 10:19 AM Brandon Williams wrote: > > On 07/27, Duy Nguyen wrote: > > On Fri, Jul 27, 2018 at 2:40 AM Stefan Beller wrote: > > > > > > Currently the refs API takes a 'ref_store' as an argument to specify > > > which ref store to

Re: [RFC PATCH 3/5] pack-objects: add delta-islands support

2018-07-27 Thread Stefan Beller
On Fri, Jul 27, 2018 at 6:13 AM Jeff King wrote: > > On Tue, Jul 24, 2018 at 10:20:05AM -0700, Stefan Beller wrote: > > > So in my understanding we have a "common base pack" and specific > > packs on top for each "island". > > Sort of. Thi

[RFC PATCH 0/3] Migrate the refs API to take the repository argument

2018-07-26 Thread Stefan Beller
, Stefan Stefan Beller (3): refs.c: migrate internal ref iteration to pass thru repository argument refs: introduce new API, wrap old API shallowly around new API replace: migrate to for_each_replace_repo_ref builtin/replace.c| 9 +- refs.c | 187

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

2018-07-26 Thread Stefan Beller
the then useless ref_store argument Signed-off-by: Stefan Beller --- refs.c | 158 +++--- refs.h | 352 +++-- 2 files changed, 407 insertions(+), 103 deletions(-) diff --git a/refs.c b/refs.c index 2513f77acb3..27e3772fca9 100644

[PATCH 3/3] replace: migrate to for_each_replace_repo_ref

2018-07-26 Thread Stefan Beller
By upgrading the replace mechanism works well for all repositories Signed-off-by: Stefan Beller --- builtin/replace.c | 9 + replace-object.c | 7 --- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c index ef22d724bbc..fd8a935eb77

[PATCH 1/3] refs.c: migrate internal ref iteration to pass thru repository argument

2018-07-26 Thread Stefan Beller
large. So convert the internals of the ref subsystem first to pass through a repository argument without exposing the change to the user. Assume the_repository for the passed through repository, although it is not used anywhere yet. Signed-off-by: Stefan Beller --- refs.c | 39

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

2018-07-26 Thread Stefan Beller
> > To allow me to protest in a timely manner, I wanted to teach GitGitGadget > (which is the main reason I work on range-diff, as you undoubtedly suspect > by now) to warn me about such instances. I did not suspect that GGG is the prime motivation for range diff; as it proves useful (a) on its

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

2018-07-26 Thread Stefan Beller
On Thu, Jul 26, 2018 at 10:18 AM Han-Wen Nienhuys wrote: > > Supported keywords are "error", "warning", "hint" and "success". Thanks for taking this upstream. :-) > > TODO: > * make the coloring optional? What variable to use? This is the natural extension of the topic merged at a56fb3dcc09

Re: What's cooking in git.git (Jul 2018, #03; Wed, 25)

2018-07-25 Thread Stefan Beller
On Wed, Jul 25, 2018 at 3:13 PM Junio C Hamano wrote: > > Here are the topics that have been cooking. Commits prefixed with > '-' are only in 'pu' (proposed updates) while commits prefixed with > '+' are in 'next'. The ones marked with '.' do not appear in any of > the integration branches, but

Re: [GSoC][PATCH v4 00/20] rebase -i: rewrite in C

2018-07-25 Thread Stefan Beller
On Tue, Jul 24, 2018 at 9:34 AM Alban Gruin wrote: > > This patch series rewrite the interactive rebase from shell to C. > > It is based on master (as of 2018-07-24). > > Changes since v3: > > - The `--verbose` option is stored directly into opts.verbose > > - Drop includes in

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

2018-07-25 Thread Stefan Beller
On Mon, Jul 23, 2018 at 2:49 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > On Sat, Jul 21, 2018 at 3:04 PM Johannes Schindelin via GitGitGadget > > wrote: > > > >> Side note: I work on implementing range-diff not only to make life easier > >

Re: [PATCH] diff: --color-moved: rename "dimmed_zebra" to "dimmed-zebra"

2018-07-24 Thread Stefan Beller
On Tue, Jul 24, 2018 at 3:09 PM Jonathan Nieder wrote: > Hm. Looks like dimmed_zebra was introduced in v2.15.0-rc0~16^2~2 > (2017-06-30), so it has been around for a while (about a year). But I > would like to be able to simplify by getting rid of it. > >

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

2018-07-24 Thread Stefan Beller
On Mon, Jul 23, 2018 at 9:41 PM Jonathan Nieder wrote: > > Hi, > > Stefan Beller wrote: > > > As a user I wondered what the diff algorithms are about. Offer at least > > a basic explanation on the differences of the diff algorithms. > > Interesting. Let's see.

Re: [RFC PATCH 3/5] pack-objects: add delta-islands support

2018-07-24 Thread Stefan Beller
On Tue, Jul 24, 2018 at 2:58 AM Jeff King wrote: > > On Mon, Jul 23, 2018 at 11:52:49AM -0700, Stefan Beller wrote: > > > > +DELTA ISLANDS > > > +- > > [...] > > > > I had to read all of this [background information] to understand the >

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

2018-07-23 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 | 32 +--- 1 file changed, 25 insertions(+), 7 deletions(-) diff

Re: [PATCH 07/14] range-diff: respect diff_option.file rather than assuming 'stdout'

2018-07-23 Thread Stefan Beller
On Sun, Jul 22, 2018 at 2:58 AM Eric Sunshine wrote: > > The actual diffs output by range-diff respect diff_option.file, which > range-diff passes down the call-chain, thus are destination-agnostic. > However, output_pair_header() is hard-coded to emit to 'stdout'. Fix > this by making

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

2018-07-23 Thread Stefan Beller
> > - fputs(diff_line_prefix(o), file); > > + if (first) > > + fputs(diff_line_prefix(o), file); > > + else if (!len) > > + return; > > Can you explain this hunk in the log message? I am not sure how the > description in the log message relates to this change.

Re: [PATCH v4 16/21] range-diff --dual-color: fix bogus white-space warning

2018-07-23 Thread Stefan Beller
On Sat, Jul 21, 2018 at 3:05 PM 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 v4 11/21] range-diff: add tests

2018-07-23 Thread Stefan Beller
> +test_expect_success 'simple B...C (unmodified)' ' > + git range-diff --no-color I wonder if we want to have tests for colors, too, eventually. (Feel free to push back on it or put it into the left over hashtag. But given how much time we (or I) spent discussing colors, this would be a

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

2018-07-23 Thread Stefan Beller
On Sat, Jul 21, 2018 at 3:04 PM Johannes Schindelin via GitGitGadget wrote: > Side note: I work on implementing range-diff not only to make life easier for > reviewers who have to suffer through v2, v3, ... of my patch series, but also > to verify my changes before submitting a new iteration.

Re: [PATCH 1/1] t7406: avoid failures solely due to timing issues

2018-07-23 Thread Stefan Beller
On Mon, Jul 23, 2018 at 12:14 PM Junio C Hamano wrote: > > "Johannes Schindelin via GitGitGadget" > writes: > > > To prevent such false positives from unnecessarily costing time when > > investigating test failures, let's take the exact order of the lines out > > of the equation by sorting them

Re: [RFC PATCH 3/5] pack-objects: add delta-islands support

2018-07-23 Thread Stefan Beller
On Sat, Jul 21, 2018 at 10:49 PM Christian Couder wrote: > > From: Jeff King > > Implement support for delta islands in git pack-objects > and document how delta islands work in > "Documentation/git-pack-objects.txt". > > Signed-off-by: Jeff King > Signed-off-by: Christian Couder > --- >

Re: [PATCH] fetch-pack: mark die strings for translation

2018-07-23 Thread Stefan Beller
On Mon, Jul 23, 2018 at 10:56 AM Brandon Williams wrote: > fetch-pack is listed as a plumbing command, which means its prime consumer is supposedly a machine; But fetch-pack is also used by git-fetch that is invoked by a human, who prefers translations. .. goes reads code... This translates

Re: Hash algorithm analysis

2018-07-23 Thread Stefan Beller
On Mon, Jul 23, 2018 at 5:41 AM demerphq wrote: > > On Sun, 22 Jul 2018 at 01:59, brian m. carlson > wrote: > > I will admit that I don't love making this decision by myself, because > > right now, whatever I pick, somebody is going to be unhappy. I want to > > state, unambiguously, that I'm

Re: t7406-submodule-update shaky ?

2018-07-23 Thread Stefan Beller
On Sun, Jul 22, 2018 at 2:05 PM Torsten Bögershausen wrote: > > It seems that t7406 is sometimes shaky - when checking stderr in test > case 4. > > The order of the submodules may vary, sorting the stderr output makes it > > more reliable (and somewhat funny to read). > > Does anybody have a

Re: [PATCH v2 00/18] Consolidate reachability logic

2018-07-20 Thread Stefan Beller
Hi Derrick, > Sure! It's on my fork [1] > > [1] https://github.com/derrickstolee/git/tree/reach/refactor > Thanks! > >> * Use single rev-parse commands in test output, and pipe the OIDs through > >> 'sort' Why do we need to sort them? The order of the answers given by rev-parse is the same as

[PATCH] Documentation/git-interpret-trailers: explain possible values

2018-07-20 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Maybe we rather want to refer to the options that are described further down in the document? Documentation/git-interpret-trailers.txt | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Documentation/git-interpret-trailers.txt b

Re: refs/notes/amlog problems, was Re: [PATCH v3 01/20] linear-assignment: a function to solve least-cost assignment problems

2018-07-20 Thread Stefan Beller
+cc list On Fri, Jul 20, 2018 at 2:29 PM Junio C Hamano wrote: > ... which means that it does not matter if I have an elaborate rewrite hook > that constantly updates the reverse mapping or if the reverse mapping is > made immediately before I push out. You wouldn't even be able to tell any >

Re: refs/notes/amlog problems, was Re: [PATCH v3 01/20] linear-assignment: a function to solve least-cost assignment problems

2018-07-20 Thread Stefan Beller
On Fri, Jul 20, 2018 at 12:35 PM Junio C Hamano wrote: > It is not like anybody (including me) needs realtime up-to-date I thought the same for a long time, but contributing to other projects showed me that this is not necessarily the case. Having a real time update, even if it would be just

FYI: histogram diff bug

2018-07-20 Thread Stefan Beller
seq 1 100 >one echo 99 > two seq 1 2 98 >>two git diff --no-index --histogram one two In addition to the recent patches[1], I found another bug in the histogram algorithm, which can be produced with the instructions given above. At least I think it is a bug as the diff looks terrible to

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

2018-07-20 Thread Stefan Beller
> 1. To roll again. > > A player who rolls two sixes can reroll the dice for an additional > turn. This is where I had my AHA moment! (Consider my software development process as chaotic as a dice roll So rerolling is really just rolling the dice again to "get my patch

Re: [PATCH v2 00/18] Consolidate reachability logic

2018-07-20 Thread Stefan Beller
Hi Derrick, > V2 Update: The biggest material change in this version is that we drop the > method declarations from commit.h, which requires adding a lot of references > to commit-reach.h across the codebase. This change is in a commit on its own. > In addition, we have the following smaller

Re: [PATCH 5/8] commit-graph: not compatible with replace objects

2018-07-20 Thread Stefan Beller
> Thanks, Peff, for improving the check_replace_refs interaction [1]. > > Since this series now has two dependencies (including Stefan's ref-store > fix [2] that I had included in my v1), I'll let those topics settle > before I send a new v2. FYI: I have not been working on, nor plan to work on

Re: Find commit that referenced a blob first

2018-07-19 Thread Stefan Beller
On Thu, Jul 19, 2018 at 3:38 PM Junio C Hamano wrote: > > If the given object refers to a blob, it will be described as > > :, > > such that the blob can be found at in the , which itself > > describes the first commit in which this blob occurs in a reverse > > revision walk from HEAD. > > You

[PATCH] xdiff/histogram: remove tail recursion

2018-07-19 Thread Stefan Beller
When running the same reproduction script as the previous patch, it turns out the stack is too small, which can be easily avoided. Signed-off-by: Stefan Beller --- xdiff/xhistogram.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/xdiff/xhistogram.c b

Re: [PATCH 1/2] introduce "banned function" list

2018-07-19 Thread Stefan Beller
On Thu, Jul 19, 2018 at 2:32 PM Jeff King wrote: > > On Thu, Jul 19, 2018 at 02:15:54PM -0700, Stefan Beller wrote: > > > > Documentation/CodingGuidelines | 3 +++ > > > > I'd prefer to not add more text to our documentation > > (It is already long a

Re: Find commit that referenced a blob first

2018-07-19 Thread Stefan Beller
On Thu, Jul 19, 2018 at 2:02 PM Lars Schneider wrote: > > Hi, > > I have a blob hash and I would like to know what commit referenced > this blob first in a given Git repo. git describe If the given object refers to a blob, it will be described as :, such that the blob can be found at in the ,

Re: [PATCH 1/2] introduce "banned function" list

2018-07-19 Thread Stefan Beller
On Thu, Jul 19, 2018 at 1:39 PM Jeff King wrote: > > There are a few standard C functions (like strcpy) which are > easy to misuse. We generally discourage these in reviews, > but we haven't put advice in CodingGuidelines, nor provided > any automated enforcement. The latter is especially >

[PATCH 1/3] xdiff/xhistogram: pass arguments directly to fall_back_to_classic_diff

2018-07-19 Thread Stefan Beller
. Signed-off-by: Stefan Beller --- xdiff/xhistogram.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/xdiff/xhistogram.c b/xdiff/xhistogram.c index 73210cb6f3f..6e20f75fe85 100644 --- a/xdiff/xhistogram.c +++ b/xdiff/xhistogram.c @@ -233,6 +233,16 @@ static

[PATCH 0/3] histogram diff: Fix memory ballooning in corner case

2018-07-19 Thread Stefan Beller
h less memory pressure. Thanks, Stefan Stefan Beller (3): xdiff/xhistogram: pass arguments directly to fall_back_to_classic_diff xdiff/xhistogram: factor out memory cleanup into free_index() xdiff/xhistogram: move index allocation into find_lcs xdiff/xhistogram.c

[PATCH 2/3] xdiff/xhistogram: factor out memory cleanup into free_index()

2018-07-19 Thread Stefan Beller
This will be useful in the next patch as we'll introduce multiple callers. Signed-off-by: Stefan Beller --- xdiff/xhistogram.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/xdiff/xhistogram.c b/xdiff/xhistogram.c index 6e20f75fe85..5098b6c5021 100644

[PATCH 3/3] xdiff/xhistogram: move index allocation into find_lcs

2018-07-19 Thread Stefan Beller
essure, not the run time complexity, that is also awful for the corner case outlined above. Helpful in understanding the code (in addition to the sparse history of this file), was https://stackoverflow.com/a/32367597 which reproduces most of the code comments of the JGit implementation. Signed-off-by:

Re: [PATCH] diff.c: offer config option to control ws handling in move detection

2018-07-19 Thread Stefan Beller
On Thu, Jul 19, 2018 at 10:32 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > "git format-patch HEAD^ --color" produces red/green output > > (like git log would), so I do not see why --color-moved should impact > > format-patch differently. (i

Re: [PATCH] diff.c: offer config option to control ws handling in move detection

2018-07-19 Thread Stefan Beller
On Thu, Jul 19, 2018 at 9:29 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > On Wed, Jul 18, 2018 at 10:45 AM Junio C Hamano wrote: > >> > >> Stefan Beller writes: > >> > >> > diff --git a/Documentation/diff-options.txt > >&

Re: What's cooking in git.git (Jul 2018, #02; Wed, 18)

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 3:04 PM Junio C Hamano wrote: > Many topics have moved to 'master' and 'next' from 'next' to 'pu' > respectively. As I needed to re-resolve semantic merge conflicts > while reordering some topics (i.e. some that were merged earlier in > 'pu' are left in 'pu' while

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

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 3:24 PM Junio C Hamano wrote: > > Stefan Beller writes: > > > This fixes the compilation issue raised by SZEDER and Stolee, > > > > > > 6: 3c156c79ae7 ! 6: f82f24e73b6 submodule--helper: introduce new > > update-mo

Re: [PATCH v1 0/3] [RFC] Speeding up checkout (and merge, rebase, etc)

2018-07-18 Thread Stefan Beller
> don�t The encoding seems to be broken somehow (also on) https://public-inbox.org/git/20180718204458.20936-1-benpe...@microsoft.com/ > When I brought up this idea with some other git contributors they mentioned > that multi threading unpack_trees() had been discussed a few years ago on

Re: [PATCH v1 1/3] add unbounded Multi-Producer-Multi-Consumer queue

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 1:45 PM Ben Peart wrote: > Did you have any further considerations that are worth recording here? (memory, performance, CPU execution, threading, would all come to mind) > Signed-off-by: Ben Peart > +/* > + * Initializes a mpmcq structure. > + */ I'd find the name

Re: [PATCH] add core.usereplacerefs config option

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 1:31 PM Jeff King wrote: > > On Wed, Jul 18, 2018 at 04:23:20PM -0400, Derrick Stolee wrote: > > > This patch looks good to me. The only thing I saw was when I ran 'git grep > > check_replace_refs' and saw the following in environment.c: > > > > int check_replace_refs

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

2018-07-18 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 2/6] git-submodule.sh: rename unused variables

2018-07-18 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 5/6] builtin/submodule--helper: factor out method to update a single submodule

2018-07-18 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 6/6] submodule--helper: introduce new update-module-mode helper

2018-07-18 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 4/6] builtin/submodule--helper: store update_clone information in a struct

2018-07-18 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 0/6] Resend of origin/sb/submodule-update-in-c

2018-07-18 Thread Stefan Beller
This fixes the compilation issue raised by SZEDER and Stolee, 6: 3c156c79ae7 ! 6: f82f24e73b6 submodule--helper: introduce new update-module-mode helper @@ -10,7 +10,6 @@ for arbitrary repositories. Signed-off-by: Stefan Beller -Signed-off-by: Junio C

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

2018-07-18 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 6/6] submodule--helper: introduce new update-module-mode helper

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 8:00 AM Derrick Stolee wrote: > > On 7/12/2018 3:47 PM, Stefan Beller wrote: > > + fprintf(stdout, submodule_strategy_to_string(_strategy)); > > This line is causing build failures on 'pu' for certain setups: > yeah, will fix in a resend. origina

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

2018-07-18 Thread Stefan Beller
Hi Eric, On Tue, Jul 17, 2018 at 11:59 AM Eric Sunshine wrote: > > On Tue, Jul 17, 2018 at 2:53 PM Stefan Beller wrote: > > > A tangent. > > > > > > Because this "-- " is a conventional signature separator, MUAs like > > > Emacs message-m

[PATCH 08/10] diff.c: factor advance_or_nullify out of mark_color_as_moved

2018-07-18 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 02/10] xdiff/xdiffi.c: remove unneeded function declarations

2018-07-18 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 05/10] diff.c: adjust hash function signature to match hashmap expectation

2018-07-18 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 03/10] t4015: avoid git as a pipe input

2018-07-18 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 04/10] diff.c: do not pass diff options as keydata to hashmap

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

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

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

[PATCH 06/10] diff.c: add a blocks mode for moved code detection

2018-07-18 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 10/10] diff.c: offer config option to control ws handling in move detection

2018-07-18 Thread Stefan Beller
Signed-off-by: Stefan Beller --- Documentation/config.txt | 5 + Documentation/diff-options.txt | 7 +-- diff.c | 9 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/Documentation/config.txt b/Documentation/config.txt index

[PATCHv6 00/10] Reroll of sb/diff-color-move-more

2018-07-18 Thread Stefan Beller
the series; the end result is the same. range diff is below. (As the latest cooking email said this series is going to land in next soon, I hope this is not too late of a resend; otherwise just ignore it as the end result is the same) Thanks, Stefan Stefan Beller (10): xdiff/xdiff.h: remove unused

[PATCH 01/10] xdiff/xdiff.h: remove unused flags

2018-07-18 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 2/8] refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback

2018-07-18 Thread Stefan Beller
> > @@ -317,7 +317,7 @@ int for_each_fullref_in(const char *prefix, each_ref_fn > > fn, void *cb_data, > > int for_each_tag_ref(each_ref_fn fn, void *cb_data); > > int for_each_branch_ref(each_ref_fn fn, void *cb_data); > > int for_each_remote_ref(each_ref_fn fn, void *cb_data); > > -int

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

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 11:25 AM Andrei Rybak wrote: > > On 2018-07-17 01:05, Stefan Beller wrote: > > > > This patch brings some challenges, related to the detection of blocks. > > We need a white net the catch the possible moved lines, but then need to > >

Re: [PATCH] diff.c: offer config option to control ws handling in move detection

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 10:45 AM Junio C Hamano wrote: > > Stefan Beller writes: > > > diff --git a/Documentation/diff-options.txt b/Documentation/diff-options.txt > > index 143acd9417e..8da7fed4e22 100644 > > --- a/Documentation/diff-options.txt > > +++

Re: [RFC] push: add documentation on push v2

2018-07-18 Thread Stefan Beller
> > Given the example above for "rebase-on-push" though > > it is better to first send the packfile (as that is assumed to > > take longer) and then send the ref updates, such that the > > rebasing could be faster and has no bottleneck. > > I don't really follow this logic. I don't think it would

Re: Receiving console output from GIT 10mins after abort/termination?

2018-07-18 Thread Stefan Beller
On Tue, Jul 17, 2018 at 11:38 PM Frank Wolf wrote: > > Hi @ll, > > I hope I'm posting to the right group (not sure if it's Windows related) but > I've got > a weird problem using GIT: > > By accident I've tried to push a repository (containing an already > commited but not yet pushed submodule

Re: [PATCH 2/2] refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback

2018-07-18 Thread Stefan Beller
Hi Derrick, > Overall, I think this is the right approach. The only problem is that > you're missing a few 'the_repository' to 'r' replacements in the bodies > of show_reference and register_replace_ref. Thanks. Originally I had another approach, which was to convert all callbacks to take a

Re: [RFC] push: add documentation on push v2

2018-07-18 Thread Stefan Beller
On Wed, Jul 18, 2018 at 6:31 AM Derrick Stolee wrote: > > On 7/17/2018 7:25 PM, Stefan Beller wrote: > > On Tue, Jul 17, 2018 at 2:09 PM Brandon Williams wrote: > >> Signed-off-by: Brandon Williams > >> --- > >> > >> Since introducing protocol v2

[PATCH 2/8] refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback

2018-07-18 Thread Stefan Beller via GitGitGadget
From: Stefan Beller Signed-off-by: Stefan Beller Signed-off-by: Derrick Stolee --- builtin/replace.c | 8 refs.c| 9 - refs.h| 2 +- replace-object.c | 5 +++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/builtin/replace.c b

[PATCH 1/8] refs.c: migrate internal ref iteration to pass thru repository argument

2018-07-18 Thread Stefan Beller via GitGitGadget
From: Stefan Beller In 60ce76d3581 (refs: add repository argument to for_each_replace_ref, 2018-04-11) and 0d296c57aec (refs: allow for_each_replace_ref to handle arbitrary repositories, 2018-04-11), for_each_replace_ref learned how to iterate over refs by a given arbitrary repository. New

[PATCH] diff.c: offer config option to control ws handling in move detection

2018-07-17 Thread Stefan Beller
Signed-off-by: Stefan Beller --- This is the cherry on the cake named sb/diff-color-move-more. Documentation/config.txt | 5 + Documentation/diff-options.txt | 7 +-- diff.c | 9 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git

Re: [RFC] push: add documentation on push v2

2018-07-17 Thread Stefan Beller
On Tue, Jul 17, 2018 at 2:09 PM Brandon Williams wrote: > > Signed-off-by: Brandon Williams > --- > > Since introducing protocol v2 and enabling fetch I've been thinking > about what its inverse 'push' would look like. After talking with a > number of people I have a longish list of things that

[PATCH 0/2] RFC ref store to repository migration

2018-07-17 Thread Stefan Beller
out the whole code base (using coccinelle), but for now exposes just one example in the second patch. These patches have been developed on top of jt/commit-graph-per-object-store. Opinions? Thanks, Stefan Stefan Beller (2): refs.c: migrate internal ref iteration to pass thru repository

[PATCH 2/2] refs.c: upgrade for_each_replace_ref to be a each_repo_ref_fn callback

2018-07-17 Thread Stefan Beller
Signed-off-by: Stefan Beller --- builtin/replace.c | 3 ++- refs.c| 9 - refs.h| 2 +- replace-object.c | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/builtin/replace.c b/builtin/replace.c index ef22d724bbc..5f34659071f 100644

[PATCH 1/2] refs.c: migrate internal ref iteration to pass thru repository argument

2018-07-17 Thread Stefan Beller
large. So convert the internals of the ref subsystem first to pass through a repository argument without exposing the change to the user. Assume the_repository for the passed through repository, although it is not used anywhere yet. Signed-off-by: Stefan Beller --- refs.c | 39

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

2018-07-17 Thread Stefan Beller
On Tue, Jul 17, 2018 at 12:52 PM Junio C Hamano wrote: > > (A) This sign off is inherent to the workflow. So we could > > change the workflow, i.e. you pull series instead of applying them. > > I think this "more in git, less in email" workflow would find supporters, > > such as DScho (cc'd). >

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

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