RE: [ANNOUNCE] Git v2.17.0

2018-04-03 Thread Randall S. Becker
On April 2, 2018 3:34 PM, Junio C Hamano wrote: > Subject: [ANNOUNCE] Git v2.17.0 > > The latest feature release Git v2.17.0 is now available at the usual places. > It is > comprised of 516 non-merge commits since v2.16.0, contributed by 71 > people, 20 of which are new faces. The NonStop

Re: [PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Jeff King
On Wed, Apr 04, 2018 at 12:17:06AM +0100, Ramsay Jones wrote: > >> Is there any reason to believe this would be too small of a value in the > >> future? Or is a 32 bit unsigned good enough? > > > > The linux kernel took ~10 years to produce 500k commits. Even assuming > > those were all linear

Re: [PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Ramsay Jones
On 03/04/18 19:28, Jeff King wrote: > On Tue, Apr 03, 2018 at 11:05:36AM -0700, Brandon Williams wrote: > >> On 04/03, Derrick Stolee wrote: >>> The generation number of a commit is defined recursively as follows: >>> >>> * If a commit A has no parents, then the generation number of A is one.

Re: [RFC PATCH v3 2/2] t7406: add test for non-default branch in submodule

2018-04-03 Thread Eddy Petrișor
Notes: I am aware this test is not probably the best one and maybe I should have first one test that does a one level non-default, before trying a test with 2 levels of submodules, but I wanted to express the goal of the patch. Currently the test fails, so I am obviously missing

[PATCH] Fix condition for redirecting stderr

2018-04-03 Thread Lucas Werkmeister
Since the --log-destination option was added in 0c591cacb ("daemon: add --log-destination=(stderr|syslog|none)", 2018-02-04) with the explicit goal of allowing logging to stderr when running in inetd mode, we should not always redirect stderr to /dev/null in inetd mode, but rather only when stderr

[RFC PATCH v3 1/2] git-submodule.sh:cmd_update: if submodule branch exists, fetch that instead of default

2018-04-03 Thread Eddy Petrișor
From: Eddy Petrișor There are projects such as llvm/clang which use several repositories, and they might be forked for providing support for various features such as adding Redox awareness to the toolchain. This typically means the superproject will use another branch

[RFC PATCH v3 2/2] t7406: add test for non-default branch in submodule

2018-04-03 Thread Eddy Petrișor
From: Eddy Petrișor If a submodule uses a non-default branch and the branch info is versioned, on submodule update --recursive --init the correct branch should be checked out. Signed-off-by: Eddy Petrișor --- t/t7406-submodule-update.sh | 54

Re: [RFC][PATCH] git-stash: convert git stash list to C builtin

2018-04-03 Thread Paul-Sebastian Ungureanu
On 25.03.2018 10:08, Eric Sunshine wrote: On Sat, Mar 24, 2018 at 2:23 PM, Paul-Sebastian Ungureanu wrote: Currently, because git stash is not fully converted to C, I introduced a new helper that will hold the converted commands. --- diff --git

Re: A potential approach to making tests faster on Windows

2018-04-03 Thread Eric Sunshine
On Tue, Apr 3, 2018 at 5:49 AM, Johannes Schindelin wrote: > My main evidence that shell scripts on macOS are slower than on Linux was > the difference of the improvement incurred by moving more things from > git-rebase--interactive.sh into sequencer.c: Linux saw an

[PATCH] diff: add a blocks mode for moved code detection

2018-04-03 Thread Stefan Beller
> Currently we have plain, zebra & dimmed_zebra, and zebra is the > default. > > I got an internal report from someone who had, because zebra looked > crappy in his terminal, moved to "plain", and was reporting getting > worse moved diffs as a result. > > I found that there's essentially a missing

Re: [PATCH 5/7] diff.c: refactor internal representation for coloring moved code

2018-04-03 Thread Ævar Arnfjörð Bjarmason
On Tue, Apr 03 2018, Stefan Beller wrote: > On Tue, Apr 3, 2018 at 12:39 PM, Ævar Arnfjörð Bjarmason > wrote: >> >> On Mon, Apr 02 2018, Stefan Beller wrote: >> >>> At the time the move coloring was implemented we thought an enum of modes >>> is the best to configure this

Re: [PATCH 7/7] diff.c: add --color-moved-ignore-space-delta option

2018-04-03 Thread Jonathan Tan
On Tue, 3 Apr 2018 12:22:32 -0700 Stefan Beller wrote: > On Mon, Apr 2, 2018 at 5:41 PM, Jonathan Tan wrote: > > On Mon, 2 Apr 2018 15:48:54 -0700 > > Stefan Beller wrote: > > > >> +struct ws_delta { > >> + int deltachars;

Re: Timing issue in t5570 "daemon log records all attributes"

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 09:33:10PM +0200, Jan Palus wrote: > My understanding of test "daemon log records all attributes" is that daemon > process is started in background, some git command is executed and daemon's > output (saved to daemon.log) is compared against expected value. However >

Re: [PATCH 0/3] Lazy-load trees when reading commit-graph

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 09:14:50AM -0400, Derrick Stolee wrote: > > I'm not sure what the exact solution would be, but I imagine something > > like variable-sized "struct commit"s with the parent pointers embedded, > > with some kind of flag to indicate the number of parents (and probably > >

Re: Socket activation for GitWeb FastCGI with systemd?

2018-04-03 Thread Jacob Keller
On Tue, Apr 3, 2018 at 11:53 AM, Alex Ivanov wrote: > Hi. > I want to use systemd as fastcgi spawner for gitweb + nginx. > The traffic is low and number of users is limited + traversal bots. For that > reason I've decided to use following mimimal services > > gitweb.socket >

Re: [RFC PATCH 0/7] Moved code detection: ignore space on uniform indentation

2018-04-03 Thread Jacob Keller
On Tue, Apr 3, 2018 at 12:00 PM, Stefan Beller wrote: The fun is in the last patch, which allows white space sensitive languages to trust the move detection, too. Each block that is marked as moved will have the same delta in {in-, de-}dentation. I would

Re: [PATCH 5/7] diff.c: refactor internal representation for coloring moved code

2018-04-03 Thread Stefan Beller
On Tue, Apr 3, 2018 at 12:39 PM, Ævar Arnfjörð Bjarmason wrote: > > On Mon, Apr 02 2018, Stefan Beller wrote: > >> At the time the move coloring was implemented we thought an enum of modes >> is the best to configure this feature. However as we want to tack on new >> features,

Re: [PATCH 5/7] diff.c: refactor internal representation for coloring moved code

2018-04-03 Thread Ævar Arnfjörð Bjarmason
On Mon, Apr 02 2018, Stefan Beller wrote: > At the time the move coloring was implemented we thought an enum of modes > is the best to configure this feature. However as we want to tack on new > features, the enum would grow exponentially. > > Refactor the code such that features are enabled

Timing issue in t5570 "daemon log records all attributes"

2018-04-03 Thread Jan Palus
My understanding of test "daemon log records all attributes" is that daemon process is started in background, some git command is executed and daemon's output (saved to daemon.log) is compared against expected value. However daemon.log is not a straight redirect to file -- it is being piped

Re: [PATCH 7/7] diff.c: add --color-moved-ignore-space-delta option

2018-04-03 Thread Stefan Beller
On Mon, Apr 2, 2018 at 5:41 PM, Jonathan Tan wrote: > On Mon, 2 Apr 2018 15:48:54 -0700 > Stefan Beller wrote: > >> +struct ws_delta { >> + int deltachars; >> + char firstchar; >> +}; > > I'll just make some overall design comments. > >

Re: [PATCH 6/6] commit-graph.txt: update future work

2018-04-03 Thread Jonathan Tan
On Tue, 3 Apr 2018 12:51:43 -0400 Derrick Stolee wrote: > We now calculate generation numbers in the commit-graph file and use > them in paint_down_to_common(). For completeness, I'll mention that I don't see any issues with this patch, of course. Thanks for this

Re: [PATCH 0/6] Compute and consume generation numbers

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 02:47:27PM -0400, Jeff King wrote: > On Tue, Apr 03, 2018 at 02:29:01PM -0400, Derrick Stolee wrote: > > > If we have generic "can X reach Y?" queries, then we can also use generation > > numbers there to great effect (by not walking commits Z with gen(Z) <= > > gen(Y)).

Re: [PATCH 5/6] commit.c: use generation to halt paint walk

2018-04-03 Thread Jonathan Tan
On Tue, 3 Apr 2018 12:51:42 -0400 Derrick Stolee wrote: > -static int queue_has_nonstale(struct prio_queue *queue) > +static int queue_has_nonstale(struct prio_queue *queue, uint32_t min_gen) > { > - int i; > - for (i = 0; i < queue->nr; i++) { > -

Re: [RFC PATCH 0/7] Moved code detection: ignore space on uniform indentation

2018-04-03 Thread Stefan Beller
>>> The fun is in the last patch, which allows white space sensitive >>> languages to trust the move detection, too. Each block that is marked as >>> moved will have the same delta in {in-, de-}dentation. >>> I would think this mode might be a reasonable default eventually. >> >> This sounds like

Socket activation for GitWeb FastCGI with systemd?

2018-04-03 Thread Alex Ivanov
Hi. I want to use systemd as fastcgi spawner for gitweb + nginx. The traffic is low and number of users is limited + traversal bots. For that reason I've decided to use following mimimal services gitweb.socket [Unit] Description=GitWeb Socket [Socket] ListenStream=/run/gitweb.sock Accept=false

Re: [PATCH 5/7] diff.c: refactor internal representation for coloring moved code

2018-04-03 Thread Stefan Beller
On Mon, Apr 2, 2018 at 4:51 PM, Jonathan Tan wrote: > On Mon, 2 Apr 2018 15:48:52 -0700 > Stefan Beller wrote: > >> At the time the move coloring was implemented we thought an enum of modes >> is the best to configure this feature. However as we

Re: [PATCH 3/6] commit-graph: compute generation numbers

2018-04-03 Thread Stefan Beller
On Tue, Apr 3, 2018 at 11:30 AM, Jonathan Tan wrote: > On Tue, 3 Apr 2018 12:51:40 -0400 > Derrick Stolee wrote: > >> + if ((*list)->generation != GENERATION_NUMBER_UNDEF) { >> + if ((*list)->generation >

Re: [PATCH 0/6] Compute and consume generation numbers

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 02:29:01PM -0400, Derrick Stolee wrote: > If we have generic "can X reach Y?" queries, then we can also use generation > numbers there to great effect (by not walking commits Z with gen(Z) <= > gen(Y)). Perhaps I should look at that "git branch --contains" thread for >

Re: [PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Stefan Beller
On Tue, Apr 3, 2018 at 11:28 AM, Jeff King wrote: > On Tue, Apr 03, 2018 at 11:05:36AM -0700, Brandon Williams wrote: > >> On 04/03, Derrick Stolee wrote: >> > The generation number of a commit is defined recursively as follows: >> > >> > * If a commit A has no parents, then the

Re: [PATCH 3/3] commit-graph: lazy-load trees

2018-04-03 Thread Stefan Beller
>>> +/* >>> + * For performance reasons, a commit loaded from the graph does not >>> + * have a tree loaded until trying to consume it for the first time. >> >> That is the theme of this series/patch, but do we need to write it down >> into the codebase? I'd be inclined to omit this part and only

Re: [PATCH 1/6] object.c: parse commit in graph first

2018-04-03 Thread Derrick Stolee
On 4/3/2018 2:28 PM, Jeff King wrote: On Tue, Apr 03, 2018 at 11:21:36AM -0700, Jonathan Tan wrote: On Tue, 3 Apr 2018 12:51:38 -0400 Derrick Stolee wrote: Most code paths load commits using lookup_commit() and then parse_commit(). In some cases, including some

Re: [PATCH 4/6] commit: use generations in paint_down_to_common()

2018-04-03 Thread Jonathan Tan
On Tue, 3 Apr 2018 12:51:41 -0400 Derrick Stolee wrote: > +int compare_commits_by_gen_then_commit_date(const void *a_, const void *b_, > void *unused) > +{ > + const struct commit *a = a_, *b = b_; > + > + if (a->generation < b->generation) > + return

Re: [PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Brandon Williams
On 04/03, Jeff King wrote: > On Tue, Apr 03, 2018 at 11:05:36AM -0700, Brandon Williams wrote: > > > On 04/03, Derrick Stolee wrote: > > > The generation number of a commit is defined recursively as follows: > > > > > > * If a commit A has no parents, then the generation number of A is one. > >

Re: [PATCH 4/6] commit: use generations in paint_down_to_common()

2018-04-03 Thread Stefan Beller
On Tue, Apr 3, 2018 at 9:51 AM, Derrick Stolee wrote: > Define compare_commits_by_gen_then_commit_date(), which uses generation > numbers as a primary comparison and commit date to break ties (or as a > comparison when both commits do not have computed generation numbers).

Re: [PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Derrick Stolee
On 4/3/2018 2:28 PM, Jeff King wrote: On Tue, Apr 03, 2018 at 11:05:36AM -0700, Brandon Williams wrote: On 04/03, Derrick Stolee wrote: The generation number of a commit is defined recursively as follows: * If a commit A has no parents, then the generation number of A is one. * If a commit A

Re: [PATCH 3/6] commit-graph: compute generation numbers

2018-04-03 Thread Jonathan Tan
On Tue, 3 Apr 2018 12:51:40 -0400 Derrick Stolee wrote: > + if ((*list)->generation != GENERATION_NUMBER_UNDEF) { > + if ((*list)->generation > GENERATION_NUMBER_MAX) > + die("generation number %u is too large to

Re: [PATCH 0/6] Compute and consume generation numbers

2018-04-03 Thread Derrick Stolee
On 4/3/2018 2:03 PM, Brandon Williams wrote: On 04/03, Derrick Stolee wrote: This is the first of several "small" patches that follow the serialized Git commit graph patch (ds/commit-graph). As described in Documentation/technical/commit-graph.txt, the generation number of a commit is one more

Re: [PATCH 1/6] object.c: parse commit in graph first

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 11:21:36AM -0700, Jonathan Tan wrote: > On Tue, 3 Apr 2018 12:51:38 -0400 > Derrick Stolee wrote: > > > Most code paths load commits using lookup_commit() and then > > parse_commit(). In some cases, including some branch lookups, the commit > > is

Re: [PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 11:05:36AM -0700, Brandon Williams wrote: > On 04/03, Derrick Stolee wrote: > > The generation number of a commit is defined recursively as follows: > > > > * If a commit A has no parents, then the generation number of A is one. > > * If a commit A has parents, then the

Re: [PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Jonathan Tan
On Tue, 3 Apr 2018 12:51:39 -0400 Derrick Stolee wrote: > The generation number of a commit is defined recursively as follows: > > * If a commit A has no parents, then the generation number of A is one. > * If a commit A has parents, then the generation number of A is

Re: [PATCH 3/3] commit-graph: lazy-load trees

2018-04-03 Thread Derrick Stolee
On 4/3/2018 2:00 PM, Stefan Beller wrote: On Tue, Apr 3, 2018 at 5:00 AM, Derrick Stolee wrote: The commit-graph file provides quick access to commit data, including the OID of the root tree for each commit in the graph. When performing a deep commit-graph walk, we may

Re: [PATCH 1/6] object.c: parse commit in graph first

2018-04-03 Thread Jonathan Tan
On Tue, 3 Apr 2018 12:51:38 -0400 Derrick Stolee wrote: > Most code paths load commits using lookup_commit() and then > parse_commit(). In some cases, including some branch lookups, the commit > is parsed using parse_object_buffer() which side-steps parse_commit() in >

Re: [PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Brandon Williams
On 04/03, Derrick Stolee wrote: > The generation number of a commit is defined recursively as follows: > > * If a commit A has no parents, then the generation number of A is one. > * If a commit A has parents, then the generation number of A is one > more than the maximum generation number

Re: [PATCH 0/6] Compute and consume generation numbers

2018-04-03 Thread Brandon Williams
On 04/03, Derrick Stolee wrote: > This is the first of several "small" patches that follow the serialized > Git commit graph patch (ds/commit-graph). > > As described in Documentation/technical/commit-graph.txt, the generation > number of a commit is one more than the maximum generation number

Re: [PATCH 3/3] commit-graph: lazy-load trees

2018-04-03 Thread Stefan Beller
On Tue, Apr 3, 2018 at 5:00 AM, Derrick Stolee wrote: > The commit-graph file provides quick access to commit data, including > the OID of the root tree for each commit in the graph. When performing > a deep commit-graph walk, we may not need to load most of the trees > for

[PATCH] commit: allow partial commits with relative paths

2018-04-03 Thread Brandon Williams
Commit 8894d53580 (commit: allow partial commits with relative paths, 2011-07-30) ensured that partial commits were allowed when a user supplies a relative pathspec but then this was regressed in 5879f5684c (remove prefix argument from pathspec_prefix, 2011-09-04) when the prefix argument to

[PATCH] l10n: de.po: fix a 'add --interactive' message

2018-04-03 Thread Ralf Thielow
Noticed-by: Matthias Rüster Signed-off-by: Ralf Thielow --- po/de.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/de.po b/po/de.po index 793bd2a80..257f527d6 100644 --- a/po/de.po +++ b/po/de.po @@ -16991,7 +16991,7

Re: [PATCH] l10n: de.po: translate 132 new messages

2018-04-03 Thread Ralf Thielow
2018-04-02 20:09 GMT+02:00 Matthias Rüster : > Hi Ralf, > > thanks a lot for your translations! > > I've only found a small issue: > >> #: git-add--interactive.perl:1405 >> -#, fuzzy, perl-format >> +#, perl-format >> msgid "Discard this hunk from worktree

[PATCH] l10n: TEAMS: remove inactive de team members

2018-04-03 Thread Ralf Thielow
Thanks for your contributions! Signed-off-by: Ralf Thielow --- po/TEAMS | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/po/TEAMS b/po/TEAMS index 065771cfe..762879550 100644 --- a/po/TEAMS +++ b/po/TEAMS @@ -13,12 +13,8 @@ Members: Alex

Re: [PATCH 0/6] Compute and consume generation numbers

2018-04-03 Thread Derrick Stolee
On 4/3/2018 12:51 PM, Derrick Stolee wrote: This is the first of several "small" patches that follow the serialized Git commit graph patch (ds/commit-graph). As described in Documentation/technical/commit-graph.txt, the generation number of a commit is one more than the maximum generation

[PATCH 2/6] commit: add generation number to struct commmit

2018-04-03 Thread Derrick Stolee
The generation number of a commit is defined recursively as follows: * If a commit A has no parents, then the generation number of A is one. * If a commit A has parents, then the generation number of A is one more than the maximum generation number among the parents of A. Add a uint32_t

[PATCH 1/6] object.c: parse commit in graph first

2018-04-03 Thread Derrick Stolee
Most code paths load commits using lookup_commit() and then parse_commit(). In some cases, including some branch lookups, the commit is parsed using parse_object_buffer() which side-steps parse_commit() in favor of parse_commit_buffer(). Before adding generation numbers to the commit-graph, we

[PATCH 4/6] commit: use generations in paint_down_to_common()

2018-04-03 Thread Derrick Stolee
Define compare_commits_by_gen_then_commit_date(), which uses generation numbers as a primary comparison and commit date to break ties (or as a comparison when both commits do not have computed generation numbers). Since the commit-graph file is closed under reachability, we know that all commits

[PATCH 3/6] commit-graph: compute generation numbers

2018-04-03 Thread Derrick Stolee
While preparing commits to be written into a commit-graph file, compute the generation numbers using a depth-first strategy. The only commits that are walked in this depth-first search are those without a precomputed generation number. Thus, computation time will be relative to the number of new

[PATCH 5/6] commit.c: use generation to halt paint walk

2018-04-03 Thread Derrick Stolee
In paint_down_to_common(), the walk is halted when the queue contains only stale commits. The queue_has_nonstale() method iterates over the entire queue looking for a nonstale commit. In a wide commit graph where the two sides share many commits in common, but have deep sets of different commits,

[PATCH 6/6] commit-graph.txt: update future work

2018-04-03 Thread Derrick Stolee
We now calculate generation numbers in the commit-graph file and use them in paint_down_to_common(). Signed-off-by: Derrick Stolee --- Documentation/technical/commit-graph.txt | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[PATCH 0/6] Compute and consume generation numbers

2018-04-03 Thread Derrick Stolee
This is the first of several "small" patches that follow the serialized Git commit graph patch (ds/commit-graph). As described in Documentation/technical/commit-graph.txt, the generation number of a commit is one more than the maximum generation number among its parents (trivially, a commit with

Re: [PATCH v2 00/15] Assorted fixes for `git config` (including the "empty sections" bug)

2018-04-03 Thread Johannes Schindelin
Hi team, On Tue, 3 Apr 2018, Johannes Schindelin wrote: > Johannes Schindelin (15): > git_config_set: fix off-by-two > t1300: rename it to reflect that `repo-config` was deprecated > t1300: demonstrate that --replace-all can "invent" newlines > config --replace-all: avoid extra line

[PATCH v2 14/15] git_config_set: reuse empty sections

2018-04-03 Thread Johannes Schindelin
It can happen quite easily that the last setting in a config section is removed, and to avoid confusion when there are comments in the config about that section, we keep a lone section header, i.e. an empty section. Now that we use the `event_fn` callback, it is easy to add support for re-using

[PATCH v2 12/15] git_config_set: make use of the config parser's event stream

2018-04-03 Thread Johannes Schindelin
In the recent commit with the title "config: introduce an optional event stream while parsing", we introduced an optional callback to keep track of the config parser's events "comment", "white-space", "section header" and "entry". One motivation for this feature was to make use of it in the code

[PATCH v2 10/15] config_set_store: rename some fields for consistency

2018-04-03 Thread Johannes Schindelin
The `seen` field is the actual length of the `offset` array, and the `offset_alloc` field records what was allocated (to avoid resizing wherever `seen` has to be incremented). Elsewhere, we use the convention `name` for the array, where `name` is descriptive enough to guess its purpose, `name_nr`

[PATCH v2 11/15] git_config_set: do not use a state machine

2018-04-03 Thread Johannes Schindelin
While a neat theoretical construct, state machines are hard to read. In this instance, it does not even make a whole lot of sense because we are more interested in flags, anyway: has the section been seen? Has the key been seen? Does the current section match the key we are looking for? Besides,

[PATCH v2 13/15] git config --unset: remove empty sections (in the common case)

2018-04-03 Thread Johannes Schindelin
The original reasoning for not removing section headers upon removal of the last entry went like this: the user could have added comments about the section, or about the entries therein, and if there were other comments there, we would not know whether we should remove them. In particular, a

[PATCH v2 08/15] config: introduce an optional event stream while parsing

2018-04-03 Thread Johannes Schindelin
This extends our config parser so that it can optionally produce an event stream via callback function, where it reports e.g. when a comment was parsed, or a section header, etc. This parser will be used subsequently to handle the scenarios better where removing config entries would make sections

[PATCH v2 07/15] t1300: `--unset-all` can leave an empty section behind (bug)

2018-04-03 Thread Johannes Schindelin
We already have a test demonstrating that removing the last entry from a config section fails to remove the section header of the now-empty section. The same can happen, of course, if we remove the last entries in one fell swoop. This is *also* a bug, and should be fixed at the same time.

[PATCH v2 09/15] config: avoid using the global variable `store`

2018-04-03 Thread Johannes Schindelin
It is much easier to reason about, when the config code to set/unset variables or to remove/rename sections does not rely on a global (or file-local) variable. Signed-off-by: Johannes Schindelin --- config.c | 119

[PATCH v2 05/15] t1300: avoid relying on a bug

2018-04-03 Thread Johannes Schindelin
The test case 'unset with cont. lines' relied on a bug that is about to be fixed: it tests *explicitly* that removing the last entry from a config section leaves an *empty* section behind. Let's fix this test case not to rely on that behavior, simply by preventing the section from becoming empty.

[PATCH v2 04/15] config --replace-all: avoid extra line breaks

2018-04-03 Thread Johannes Schindelin
When replacing multiple config entries at once, we did not re-set the flag that indicates whether we need to insert a new-line before the new entry. As a consequence, an extra new-line was inserted under certain circumstances. Signed-off-by: Johannes Schindelin ---

[PATCH v2 03/15] t1300: demonstrate that --replace-all can "invent" newlines

2018-04-03 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- t/t1300-config.sh | 21 + 1 file changed, 21 insertions(+) diff --git a/t/t1300-config.sh b/t/t1300-config.sh index 4f8e6f5fde3..cc417687e8d 100755 --- a/t/t1300-config.sh +++ b/t/t1300-config.sh @@ -1611,4

[PATCH v2 02/15] t1300: rename it to reflect that `repo-config` was deprecated

2018-04-03 Thread Johannes Schindelin
Signed-off-by: Johannes Schindelin --- t/{t1300-repo-config.sh => t1300-config.sh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename t/{t1300-repo-config.sh => t1300-config.sh} (100%) diff --git a/t/t1300-repo-config.sh b/t/t1300-config.sh similarity index

[PATCH v2 00/15] Assorted fixes for `git config` (including the "empty sections" bug)

2018-04-03 Thread Johannes Schindelin
This patch series originally only tried to help fixing that annoying bug that has been reported several times over the years, where `git config --unset` would leave empty sections behind, and `git config --add` would not reuse them. The first patch is somewhat of a "while at it" bug fix that I

[PATCH v2 01/15] git_config_set: fix off-by-two

2018-04-03 Thread Johannes Schindelin
Currently, we are slightly overzealous When removing an entry from a config file of this form: [abc]a [xyz] key = value When calling `git config --unset abc.a` on this file, it leaves this (invalid) config behind: [ [xyz] key =

Re: A potential approach to making tests faster on Windows

2018-04-03 Thread Johannes Schindelin
Hi Peff, On Tue, 3 Apr 2018, Jeff King wrote: > On Tue, Apr 03, 2018 at 01:43:10PM +0200, Johannes Schindelin wrote: > > > > I don't have time or interest to work on this now, but thought it was > > > interesting to share. This assumes that something in shellscript like: > > > > > > while

Re: A potential approach to making tests faster on Windows

2018-04-03 Thread Johannes Schindelin
Hi Ævar, On Tue, 3 Apr 2018, Ævar Arnfjörð Bjarmason wrote: > [...] I think it would be really interesting to see the third > approach I suggested, i.e. hack the shell to make the test_cmp a builtin > and test that. Then you won't fork, but will get the advantage of your > fast C codepath. That

Re: [PATCH 1/9] git_config_set: fix off-by-two

2018-04-03 Thread Johannes Schindelin
Hi Duy, On Tue, 3 Apr 2018, Duy Nguyen wrote: > On Tue, Apr 3, 2018 at 11:31 AM, Johannes Schindelin > wrote: > > It is very frustrating to spend that much time with only little gains > > here and there (and BusyBox-w32 is simply not robust enough yet, apart > > from

Re: [PATCH 1/9] git_config_set: fix off-by-two

2018-04-03 Thread Duy Nguyen
On Tue, Apr 3, 2018 at 11:31 AM, Johannes Schindelin wrote: > It is very frustrating to spend that much time with only little gains here > and there (and BusyBox-w32 is simply not robust enough yet, apart from > also not showing a significant improvement in

Re: [PATCH] t2028: tighten grep expression to make "move worktree" test more robust

2018-04-03 Thread Duy Nguyen
On Tue, Apr 3, 2018 at 11:25 AM, Eric Sunshine wrote: > Following a rename of worktree "source" to "destination", the "move > worktree" test uses grep to verify that the output of "git worktree list > --porcelain" does not contain "source" (and does contain

Re: [PATCH 4/3] Makefile: untangle DEVELOPER and -Werror

2018-04-03 Thread Duy Nguyen
On Tue, Apr 03, 2018 at 11:19:46AM +0200, Ævar Arnfjörð Bjarmason wrote: > > On Sat, Mar 31 2018, Duy Nguyen wrote: > > > On Sat, Mar 31, 2018 at 6:40 PM, Ævar Arnfjörð Bjarmason > > wrote: > >> Change the DEVELOPER flag, and the newly added EAGER_DEVELOPER flag > >> which

[PATCH v3 2/2] t3200: verify "branch --list" sanity when rebasing from detached HEAD

2018-04-03 Thread Kaartic Sivaraam
From: Eric Sunshine "git branch --list" shows an in-progress rebase as: * (no branch, rebasing ) master ... However, if the rebase is started from a detached HEAD, then there is no , and it would attempt to print a NULL pointer. The previous commit fixed this

Re: Bad refspec messes up bundle.

2018-04-03 Thread Johannes Schindelin
Hi Luciano, On Sat, 31 Mar 2018, Luciano Joublanc wrote: > I've cloned the `maint` branch, built the project, and added the test > as you suggested - it's failing as expected. Excellent. > On 30 March 2018 at 11:20, Johannes Schindelin > wrote: > > > > However,

[PATCH 2/2] t5561: skip tests if curl is not available

2018-04-03 Thread Jeff King
It's possible to have libcurl installed but not the curl command-line utility. The latter is not generally needed for Git's http support, but we use it in t5561 for basic tests of http-backend's functionality. Let's detect when it's missing and skip this test. Note that we can't mark the

[PATCH 1/2] t5561: drop curl stderr redirects

2018-04-03 Thread Jeff King
For a normal test run, stderr is already redirected to /dev/null by the test suite. When used with "-v", suppressing stderr is actively harmful, as it may hide the reason for curl failing. Reported-by: Jens Krüger Signed-off-by: Jeff King ---

[PATCH 0/2] t5561 fails without curl installed

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 09:14:47AM -0400, Jeff King wrote: > As far as code changes in Git, perhaps (assuming my guess is right): > > - drop the redirect of stderr here; the test suite already handles > hiding stderr from the user (without "-v"), and in "-v" mode you > probably would

Re: [PATCH v2 1/5] core.aheadbehind: add new config setting

2018-04-03 Thread Jeff Hostetler
On 4/3/2018 7:39 AM, Derrick Stolee wrote: On 4/3/2018 6:18 AM, Ævar Arnfjörð Bjarmason wrote: On Tue, Apr 03 2018, Lars Schneider wrote: What is the state of this series? I can't find it in git/git nor in git-for-windows/git. I think Stolee mentioned the config in his Git Merge talk [1] and

Re: Test 5561 failed

2018-04-03 Thread Jens Krüger
Am 03.04.2018 um 15:14 schrieb Jeff King: On Tue, Apr 03, 2018 at 01:43:37PM +0200, Jens Krüger wrote: expecting success: GET refs/heads/master "404 Not Found" not ok 2 - direct refs/heads/master not found That GET function is: GET() { curl --include

Re: A potential approach to making tests faster on Windows

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 01:43:10PM +0200, Johannes Schindelin wrote: > > I don't have time or interest to work on this now, but thought it was > > interesting to share. This assumes that something in shellscript like: > > > > while echo foo; do echo bar; done > > > > Is no slower on Windows

Re: Test 5561 failed

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 01:43:37PM +0200, Jens Krüger wrote: > expecting success: > GET refs/heads/master "404 Not Found" > > not ok 2 - direct refs/heads/master not found That GET function is: GET() { curl --include "$HTTPD_URL/$SMART/repo.git/$1" >out 2>/dev/null &&

Re: [PATCH 0/3] Lazy-load trees when reading commit-graph

2018-04-03 Thread Derrick Stolee
On 4/3/2018 9:06 AM, Jeff King wrote: On Tue, Apr 03, 2018 at 08:00:54AM -0400, Derrick Stolee wrote: There are several commit-graph walks that require loading many commits but never walk the trees reachable from those commits. However, the current logic in parse_commit() requires the root

js/runtime-prefix-windows, was Re: What's cooking in git.git (Mar 2018, #06; Fri, 30)

2018-04-03 Thread Johannes Schindelin
Hi Junio, On Fri, 30 Mar 2018, Junio C Hamano wrote: > * js/runtime-prefix-windows (2018-03-27) 2 commits > - mingw/msvc: use the new-style RUNTIME_PREFIX helper > - exec_cmd: provide a new-style RUNTIME_PREFIX helper for Windows > (this branch uses dj/runtime-prefix.) > > The Windows port

Re: [PATCH 0/3] Lazy-load trees when reading commit-graph

2018-04-03 Thread Jeff King
On Tue, Apr 03, 2018 at 08:00:54AM -0400, Derrick Stolee wrote: > There are several commit-graph walks that require loading many commits > but never walk the trees reachable from those commits. However, the > current logic in parse_commit() requires the root tree to be loaded. > This only uses

Re: [PATCH v2 2/2] t3200: verify "branch --list" sanity when rebasing from detached HEAD

2018-04-03 Thread Kaartic Sivaraam
On Tuesday 03 April 2018 01:30 PM, Eric Sunshine wrote: >> Note that the "detached HEAD" test case might actually fail in some cases >> as the actual output of "git branch --list" might contain remote branch >> names which is not considered by the test case as it is rare to happen >> in the test

[ANNOUNCE] Git for Windows 2.17.0

2018-04-03 Thread Johannes Schindelin
Dear Git users, It is my pleasure to announce that Git for Windows 2.17.0 is available from: https://gitforwindows.org/ Changes since Git for Windows v2.16.3 (March 23rd 2018) New Features * Comes with Git v2.17.0. * Comes with OpenSSL v1.0.2o. * Comes with Git Credential

Re: [PATCH 0/3] Lazy-load trees when reading commit-graph

2018-04-03 Thread Derrick Stolee
On 4/3/2018 8:00 AM, Derrick Stolee wrote: There are several commit-graph walks that require loading many commits but never walk the trees reachable from those commits. However, the current logic in parse_commit() requires the root tree to be loaded. This only uses lookup_tree(), but when

[PATCH 3/3] commit-graph: lazy-load trees

2018-04-03 Thread Derrick Stolee
The commit-graph file provides quick access to commit data, including the OID of the root tree for each commit in the graph. When performing a deep commit-graph walk, we may not need to load most of the trees for these commits. Delay loading the tree object for a commit loaded from the graph

[PATCH 1/3] commit: create get_commit_tree() method

2018-04-03 Thread Derrick Stolee
While walking the commit graph, we load struct commit objects into the object cache. During this process, we also load struct tree objects for the root tree of each of these commits. We load these objects even if we are only computing commit reachability information, such as a merge base or

[PATCH 2/3] treewide: use get_commit_tree() for tree access

2018-04-03 Thread Derrick Stolee
Replace all direct accesses of the 'tree' member in 'struct commit' with calls to get_commit_tree() or get_commit_tree_oid(). This patch was constructed starting with the following Coccinelle script, then removing false-positives: @@ expression c; @@ - >tree->object.oid + get_commit_tree_oid(c)

[PATCH 0/3] Lazy-load trees when reading commit-graph

2018-04-03 Thread Derrick Stolee
There are several commit-graph walks that require loading many commits but never walk the trees reachable from those commits. However, the current logic in parse_commit() requires the root tree to be loaded. This only uses lookup_tree(), but when reading commits from the commit- graph file, the

Re: [PATCH v7 08/14] commit-graph: implement git commit-graph read

2018-04-03 Thread Derrick Stolee
On 4/2/2018 5:33 PM, Junio C Hamano wrote: Derrick Stolee writes: From: Derrick Stolee ... +static int graph_read(int argc, const char **argv) +{ + struct commit_graph *graph = 0; The previous round said NULL above, not 0, and NULL is the

Test 5561 failed

2018-04-03 Thread Jens Krüger
Git version 2.17.0 OS: Debian 9 (9.4) gcc: gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516 build from github clone: autoreconf ./configure make make test *** t5561-http-backend.sh *** ok 1 - setup repository not ok 2 - direct refs/heads/master not found # #   GET refs/heads/master

Re: A potential approach to making tests faster on Windows

2018-04-03 Thread Johannes Schindelin
Hi Ævar, On Fri, 30 Mar 2018, Ævar Arnfjörð Bjarmason wrote: > On Fri, Mar 30 2018, Johannes Schindelin wrote [expressing frustrations > about Windows test suite slowness]: To be precise (and I think it is important to be precise here): it is not the Windows test suite about which I talked, it

  1   2   >