Re: [PATCH 2/5] t4108: remove git command upstream of pipe

2019-10-23 Thread Denton Liu
On Wed, Oct 23, 2019 at 09:32:26AM -0400, Eric Sunshine wrote: > On Wed, Oct 23, 2019 at 8:04 AM Denton Liu wrote: > > Before, the output of `git diff HEAD` would always be piped to > > sanitize_conflicted_diff(). However, since the Git command was upstream > > of the pipe, in case the Git command

Re: [PATCH v2 2/2] commit-graph: fix writing first commit-graph during fetch

2019-10-23 Thread SZEDER Gábor
lowing sequence of commands: # Create a pack with two commits $ git commit --allow-empty -m one && $ git commit --allow-empty -m two && $ git repack -ad && # Make one of those commits unreachable $ git reset --hard HEAD^ && # Not even from reflogs! $

Re: [PATCH v2 1/2] t5510-fetch.sh: demonstrate fetch.writeCommitGraph bug

2019-10-23 Thread SZEDER Gábor
On Wed, Oct 23, 2019 at 01:01:34PM +, Derrick Stolee via GitGitGadget wrote: > From: Derrick Stolee > > While dogfooding, Johannes found a bug in the fetch.writeCommitGraph > config behavior. His example initially happened during a clone with > --recurse-submodules, we found that this happens

[PATCH v2 2/2] commit-graph: fix writing first commit-graph during fetch

2019-10-23 Thread Derrick Stolee via GitGitGadget
-- commit-graph.c | 11 +++ commit-reach.c | 1 - object.h | 3 ++- t/t5510-fetch.sh | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/commit-graph.c b/commit-graph.c index fc4a43b8d6..0aea7b2ae5 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -

[PATCH v2 0/2] [v2.24.0-rc0 BUG] fetch.writeCommitGraph fails on first fetch

2019-10-23 Thread Derrick Stolee via GitGitGadget
SUBMODULE, I just forgot. Sorry for derailing the investigation somewhat. The details above are the start of the commit message for [PATCH 1/2], including a test that fails when fetching after cloning a repo with a submodule. In [PATCH 2/2], I actually have the fix. I tried to include as much detail

[PATCH v2 1/2] t5510-fetch.sh: demonstrate fetch.writeCommitGraph bug

2019-10-23 Thread Derrick Stolee via GitGitGadget
From: Derrick Stolee While dogfooding, Johannes found a bug in the fetch.writeCommitGraph config behavior. His example initially happened during a clone with --recurse-submodules, we found that this happens with the first fetch after cloning a repository that contains a submodule: $ git

[PATCH 2/5] t4108: remove git command upstream of pipe

2019-10-23 Thread Denton Liu
Before, the output of `git diff HEAD` would always be piped to sanitize_conflicted_diff(). However, since the Git command was upstream of the pipe, in case the Git command fails, the return code would be lost. Rewrite into separate statements so that the return code is no longer lost. Since only t

Re: [PATCH v3 2/2] git_path(): handle `.lock` files correctly

2019-10-22 Thread Junio C Hamano
SZEDER Gábor writes: >> +char *base = buf->buf + git_dir_len, *base2 = NULL; >> + >> +if (ends_with(base, ".lock")) >> +base = base2 = xstrndup(base, strlen(base) - 5); > > Hm, this adds the magic number 5 and calls strlen(base) twice, because > ends_with() calls strip_suffix(

Re: [PATCH v2 2/2] git_path(): handle `.lock` files correctly

2019-10-22 Thread Junio C Hamano
Johannes Schindelin writes: > However, I think this is _really_ ugly and intrusive. The opposite of > what my goals were. > > So I think I'll just bite the bullet and use a temporary copy if the > argument ends in `.lock`. Sounds like a quite sensible design decision to me.

Re: [PATCH v5 1/2] format-patch: create leading components of output directory

2019-10-22 Thread Junio C Hamano
Bert Wesarg writes: > Please ignore this. Will rebase on 2.24-rc0 and will only include the > test changes. Thanks.

Re: [PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests

2019-10-22 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > Changes since v1: > > * Fixed typo "nore" -> "nor" in the commit message. > > Johannes Schindelin (2): > ci(visual-studio): use strict compile flags, and optimization > ci(visual-

[PATCH 2/3] sequencer: export the function to get the path of `.git/rebase-merge/`

2019-10-22 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin The presence of this path will be used in the next commit to fix an incorrect piece of advice in `git commit` when in the middle of a rebase. Signed-off-by: Johannes Schindelin --- sequencer.c | 4 ++-- sequencer.h | 1 + 2 files changed, 3 insertions(+), 2 deletions

[PATCH v2 2/3] merge-recursive: fix merging a subdirectory into the root directory

2019-10-22 Thread Elijah Newren via GitGitGadget
-merge-rename-directories.sh | 114 ++++ 2 files changed, 163 insertions(+), 3 deletions(-) diff --git a/merge-recursive.c b/merge-recursive.c index f80e48f623..ec60715368 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1931,6 +1931,16 @@ static char *apply_dir_

Re: [PATCH 2/2] merge-recursive: fix merging a subdirectory into the root directory

2019-10-22 Thread Elijah Newren
Sorry for the long delay before getting back to this; the other stuff I was working on took longer than expected. On Mon, Oct 14, 2019 at 3:42 AM Johannes Schindelin wrote: > On Sat, 12 Oct 2019, Elijah Newren wrote: > > On Sat, Oct 12, 2019 at 1:37 PM Johannes Schindelin > > wrote: > > > > > >

Re: [PATCH v3 2/2] git_path(): handle `.lock` files correctly

2019-10-22 Thread SZEDER Gábor
leave > unknown paths in the (worktree-specific) git directory. > > Signed-off-by: Johannes Schindelin > --- > path.c | 8 +++- > t/t1500-rev-parse.sh | 15 +++ > 2 files changed, 22 insertions(+), 1 deletion(-) > > diff --git a/pa

[RFC PATCH v2 2/3] mailinfo: collect commit metadata from mail

2019-10-22 Thread Vegard Nossum
"Metadata" here is used for the raw commit metadata which gets included in a patch when using 'git format-patch --complete'. The new email format is roughly: 1. email headers (ends with a blank line) 2. changelog (ends with "---" or when the diff starts) 3.

[PATCH v3 2/2] git_path(): handle `.lock` files correctly

2019-10-21 Thread Johannes Schindelin via GitGitGadget
_does_ ask for `index.lock`, but that is already resolved correctly, due to `update_common_dir()` preferring to leave unknown paths in the (worktree-specific) git directory. Signed-off-by: Johannes Schindelin --- path.c | 8 +++- t/t1500-rev-parse.sh | 15 +++ 2 fi

[PATCH v3 0/2] Handle git_path() with lock files correctly in worktrees

2019-10-21 Thread Johannes Schindelin via GitGitGadget
lock that isn't. Johannes Schindelin (2): t1400: wrap setup code in test case git_path(): handle `.lock` files correctly path.c| 8 +++- t/t1400-update-ref.sh | 18 ++ t/t1500-rev-parse.sh | 15 +++ 3 files changed, 32 insertions(+), 9 deleti

[PATCH v3 1/2] t1400: wrap setup code in test case

2019-10-21 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without this, you cannot use `--run=<...>` to skip that part, and a run with `--run=0` (which is a common way to determine the test case number corresponding to a given test case title). Signed-off-by: Johannes Schindelin --- t/t1400-update-ref.sh | 18 ++-

Re: [PATCH v2 2/2] git_path(): handle `.lock` files correctly

2019-10-21 Thread Johannes Schindelin
Hi Junio, On Fri, 18 Oct 2019, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > > > Ever since worktrees were introduced, the `git_path()` function _really_ > > needed to be called e.g. to get at the path to `logs/HEAD` (`HEAD` is > >

[PATCH v2 2/2] ci(visual-studio): actually run the tests in parallel

2019-10-21 Thread Johannes Schindelin via GitGitGadget
t due to a mistake on this developer's part, it was never turned on in the CI/PR builds. This results in 2x-3x longer run times of the test phase. Let's use the `--jobs=10` option to fix this. Signed-off-by: Johannes Schindelin --- azure-pipelines.yml | 2 +- 1 file changed, 1

[PATCH v2 0/2] Fix the speed of the CI (Visual Studio) tests

2019-10-21 Thread Johannes Schindelin via GitGitGadget
since v1: * Fixed typo "nore" -> "nor" in the commit message. Johannes Schindelin (2): ci(visual-studio): use strict compile flags, and optimization ci(visual-studio): actually run the tests in parallel azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 del

[PATCH v2 1/2] ci(visual-studio): use strict compile flags, and optimization

2019-10-21 Thread Johannes Schindelin via GitGitGadget
us to use the POSIX emulation layer provided by MSYS2). Signed-off-by: Johannes Schindelin --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9f099b9529..457c6fee31 100644 --- a/azure-pipelines.yml +++ b/azure

Re: [PATCH 0/2] path.c: minor common_list fixes

2019-10-21 Thread Johannes Schindelin
the bug doesn't > actually manifest in undesired behavior. > The first is a minor cleanup, so future readers won't have a 'Huh?' > moment like I just did. > > SZEDER Gábor (2): > path.c: fix field name in 'struct common_dir' > path.c: mark 'logs

Re: [RFC PATCH 2/7] autostash: extract read_one() from rebase

2019-10-21 Thread Johannes Schindelin
Hi, On Fri, 18 Oct 2019, Phillip Wood wrote: > Hi Denton > > On 16/10/2019 18:26, Denton Liu wrote: > > Begin the process of lib-ifying the autostash code. In a future commit, > > this will be used to implement `--autostash` in other builtins. > > > > This patch is best viewed with `--color-moved

[PATCH v4 2/6] midx: add progress to write_midx_file

2019-10-21 Thread William Baker via GitGitGadget
From: William Baker Add progress to write_midx_file. Progress is displayed when the MIDX_PROGRESS flag is set. Signed-off-by: William Baker --- midx.c | 25 + 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/midx.c b/midx.c index f169a681dd..006f36b570 10

[PATCH 2/5] path.c: clarify trie_find()'s in-code comment

2019-10-21 Thread SZEDER Gábor
A fairly long comment describes trie_find()'s behavior and shows examples, but it's slightly incomplete/inaccurate. Update this comment to specify how trie_find() handles a negative return value from the given match function. Furthermore, update the list of examples to include not only two but th

Re: [PATCH v5 1/2] format-patch: create leading components of output directory

2019-10-21 Thread Bert Wesarg
in v2: > * squashed and base new tests on 'dl/format-patch-doc-test-cleanup' > > Changes in v3: > * avoid applying adjust_shared_perm > > Changes in v4: > * based on dl/format-patch-doc-test-cleanup and adopt it > > Changes in v5: > * make tests self-containe

[PATCH v5 2/2] format-patch: configure a command to generate the output directory name

2019-10-21 Thread Bert Wesarg
xt| 5 + Documentation/git-format-patch.txt | 6 +- builtin/log.c | 24 +++- t/t4014-format-patch.sh| 26 ++ 4 files changed, 59 insertions(+), 2 deletions(-) diff --git a/Documentation/config/format.txt b/Documentat

[PATCH v5 1/2] format-patch: create leading components of output directory

2019-10-21 Thread Bert Wesarg
pt it Changes in v5: * make tests self-contained Cc: Denton Liu Cc: Junio C Hamano Cc: SZEDER Gábor --- Documentation/config/format.txt| 2 +- Documentation/git-format-patch.txt | 3 ++- builtin/log.c | 16 t/t4014-format-patch.sh | 26

Re: [PATCH v2 2/4] libgit: Expose more worktree functionality.

2019-10-20 Thread Junio C Hamano
Peter Jones writes: Same comment on the commit title as 1/4; also, we tend not to upcase the first word after the : word and omit the full-stop on the title (see "git shortlog -32 --no-merges" on our project for examples). > Add delete_worktrees_dir_if_empty() and prune_worktree() to the public

Re: [PATCH 2/2] ci(visual-studio): actually run the tests in parallel

2019-10-20 Thread Eric Sunshine
On Sun, Oct 20, 2019 at 4:39 PM Johannes Schindelin via GitGitGadget wrote: > [...] > During that transition, we needed to implement a new way to run the test > suite in parallel, as Visual Studio users typically will only have a Git > Bash available (which does not ship with `make` nore with supp

[PATCH 2/2] ci(visual-studio): actually run the tests in parallel

2019-10-20 Thread Johannes Schindelin via GitGitGadget
, but due to a mistake on this developer's part, it was never turned on in the CI/PR builds. This results in 2x-3x longer run times of the test phase. Let's use the `--jobs=10` option to fix this. Signed-off-by: Johannes Schindelin --- azure-pipelines.yml | 2 +- 1 file changed, 1

[PATCH 0/2] Fix the speed of the CI (Visual Studio) tests

2019-10-20 Thread Johannes Schindelin via GitGitGadget
Schindelin (2): ci(visual-studio): use strict compile flags, and optimization ci(visual-studio): actually run the tests in parallel azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) base-commit: d966095db01190a2196e31195ea6fa0c722aa732 Published-As: https

[PATCH 1/2] ci(visual-studio): use strict compile flags, and optimization

2019-10-20 Thread Johannes Schindelin via GitGitGadget
us to use the POSIX emulation layer provided by MSYS2). Signed-off-by: Johannes Schindelin --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 9f099b9529..457c6fee31 100644 --- a/azure-pipelines.yml +++ b/azure

[PATCH v2 2/9] packfile: expose get_delta_base()

2019-10-19 Thread Christian Couder
From: Jeff King In a following commit get_delta_base() will be used outside packfile.c, so let's make it non static and declare it in packfile.h. Signed-off-by: Jeff King Signed-off-by: Christian Couder --- packfile.c | 10 +- packfile.h | 3 +++ 2 files changed, 8 insertions(

Re: [PATCH v6 1/2] documentation: add tutorial for first contribution

2019-10-18 Thread Emily Shaffer
On Fri, Oct 18, 2019 at 06:40:27PM +0200, SZEDER Gábor wrote: > > Just leaving a quick note here: an entry about the new command should > be added to 'command-list.txt' as well, so it will be included in the > list of available commands in 'git help -a' or even in 'git help' > and in completion, i

[PATCH v2 2/4] libgit: Expose more worktree functionality.

2019-10-18 Thread Peter Jones
Add delete_worktrees_dir_if_empty() and prune_worktree() to the public API, so they can be used from more places. Also add a new function, prune_worktree_if_missing(), which prunes unlocked worktrees if they aren't present on the filesystem. Signed-off-by: Peter Jones --- builtin/worktree.c | 7

Re: [PATCH 2/2] Make "git branch -d" prune missing worktrees automatically.

2019-10-18 Thread Peter Jones
x27; for details. Ah, thanks for that, I had not realized "lock" was relevant here as I have never used it. That explains some of what seemed to me like a very strange usage model. On Thu, Oct 17, 2019 at 01:28:09PM -0400, Eric Sunshine wrote: > Echoing SEZDER's com

Re: [PATCH v6 1/2] documentation: add tutorial for first contribution

2019-10-18 Thread SZEDER Gábor
On Fri, May 17, 2019 at 12:07:02PM -0700, Emily Shaffer wrote: > +=== Adding a New Command > + > +Lots of the subcommands are written as builtins, which means they are > +implemented in C and compiled into the main `git` executable. Implementing > the > +very simple `psuh` command as a built-in wi

Re: [PATCH v2 2/2] git_path(): handle `.lock` files correctly

2019-10-18 Thread SZEDER Gábor
On Fri, Oct 18, 2019 at 10:23:00AM +0900, Junio C Hamano wrote: > > diff --git a/path.c b/path.c > > index e3da1f3c4e..ff85692b45 100644 > > --- a/path.c > > +++ b/path.c > > @@ -268,7 +268,7 @@ static int trie_find(struct trie *root, const char > > *key, match_fn fn, > > int result; > > s

[PATCH 0/2] path.c: minor common_list fixes

2019-10-18 Thread SZEDER Gábor
inor cleanup, so future readers won't have a 'Huh?' moment like I just did. SZEDER Gábor (2): path.c: fix field name in 'struct common_dir' path.c: mark 'logs/HEAD' in 'common_list' as file path.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) -- 2.23.0.1084.gae250eaa40

[PATCH 2/2] path.c: mark 'logs/HEAD' in 'common_list' as file

2019-10-18 Thread SZEDER Gábor
only function that looks at the 'is_dir' bit, and that function either returns 0, or '!exclude', which for 'logs/HEAD' results in 0 as well. Signed-off-by: SZEDER Gábor --- path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/path.c b/path.

[PATCH 1/2] path.c: fix field name in 'struct common_dir'

2019-10-18 Thread SZEDER Gábor
An array of 'struct common_dir' instances is used to specify whether various paths in the '.git' directory are worktree-specific or belong to the main worktree. Confusingly, the path is recorded in the struct's 'dirname' field, even though it can be a regular file, e.g. 'gc.pid'. Rename this 'dir

Re: [PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-18 Thread SZEDER Gábor
On Fri, Oct 18, 2019 at 01:06:18PM +0200, SZEDER Gábor wrote: > > > On a related note, I'm not sure whether the path of the reflogs > > > directory is right while in a different working tree... Both with and > > > without this patch I get a path pointing to the main working tree: > > > > > > $ .

Re: [PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-18 Thread SZEDER Gábor
On Fri, Oct 18, 2019 at 12:05:20AM +0200, Johannes Schindelin wrote: > > I tried to reproduce this issue in a working tree, but > > no matter what I've tried, 'git rev-parse --git-dir index.lock' always > > returned the right path. > > With `s/--git-dir/--git-path/`, I agree. Right. I mistyped i

Re: [RFC PATCH 2/7] autostash: extract read_one() from rebase

2019-10-18 Thread Phillip Wood
Hi Denton On 16/10/2019 18:26, Denton Liu wrote: Begin the process of lib-ifying the autostash code. In a future commit, this will be used to implement `--autostash` in other builtins. This patch is best viewed with `--color-moved` and `--color-moved-ws=allow-indentation-change`. Signed-off-by

Re: [PATCH v2 2/3] grep: make PCRE2 aware of custom allocator

2019-10-17 Thread Junio C Hamano
"Carlo Marcelo Arenas Belón via GitGitGadget" writes: > builtin/grep.c | 1 + > grep.c | 34 +- > grep.h | 1 + > 3 files changed, 35 insertions(+), 1 deletion(-) > > +#if defined(USE_LIBPCRE2) > + if (!pcre2_global_context) > +

Re: [PATCH v2 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Junio C Hamano
"Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > Ever since worktrees were introduced, the `git_path()` function _really_ > needed to be called e.g. to get at the path to `logs/HEAD` (`HEAD` is > specific to the worktree). However, the wrong path is returned for > `

Re: [PATCH 2/2] notes: fix minimum number of parameters to "copy" subcommand

2019-10-17 Thread Junio C Hamano
Doan Tran Cong Danh writes: > Documentation/git-notes.txt | 6 +++--- > builtin/notes.c | 2 +- > t/t3301-notes.sh| 40 +++-- > 3 files changed, 42 insertions(+), 6 deletions(-) Thanks, makes sense.

Re: [PATCH 1/2] t3301: test diagnose messages for too few/many paramters

2019-10-17 Thread Junio C Hamano
h). Thanks. > > Correct it. > > Signed-off-by: Doan Tran Cong Danh > --- > t/t3301-notes.sh | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/t/t3301-notes.sh b/t/t3301-notes.sh > index d3fa298c6a..d7767e4438 100755 > --- a/t/t3301-no

[PATCH v2 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Johannes Schindelin via GitGitGadget
that is already resolved correctly. Signed-off-by: Johannes Schindelin --- path.c | 4 ++-- t/t1500-rev-parse.sh | 15 +++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/path.c b/path.c index e3da1f3c4e..ff85692b45 100644 --- a/path.c +++ b/path.c @@ -268,7 +

[PATCH v2 1/2] t1400: wrap setup code in test case

2019-10-17 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without this, you cannot use `--run=<...>` to skip that part, and a run with `--run=0` (which is a common way to determine the test case number corresponding to a given test case title). Signed-off-by: Johannes Schindelin --- t/t1400-update-ref.sh | 18 ++-

[PATCH v2 0/2] Handle git_path() with lock files correctly in worktrees

2019-10-17 Thread Johannes Schindelin via GitGitGadget
ock is fine, it is logs/HEAD.lock that isn't. Johannes Schindelin (2): t1400: wrap setup code in test case git_path(): handle `.lock` files correctly path.c| 4 ++-- t/t1400-update-ref.sh | 18 ++ t/t1500-rev-parse.sh | 15 +++ 3 files ch

Re: [PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Johannes Schindelin
ex.lock`. > > > > So let's make that work as script writers would expect it to. > > > > Signed-off-by: Johannes Schindelin > > --- > > path.c | 4 ++-- > > t/t1500-rev-parse.sh | 15 +++ > > 2 files changed, 17 inserti

[PATCH v2 2/7] index-pack: unify threaded and unthreaded code

2019-10-17 Thread Jonathan Tan
Signed-off-by: Jonathan Tan --- builtin/index-pack.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 60a5591039..df6b3b8cf6 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1210,15 +1210,7 @@ static vo

Re: [PATCH 1/2] git-gui: implement proc select_path_in_widget

2019-10-17 Thread Pratyush Yadav
ave a config option, and it should be turned off by default. That said, I'd certainly like to hear what other people think on this topic. > FWIW I've also got 2 comments on this in GH[1]. > > [1] https://github.com/git-for-windows/git/issues/2341 -- Regards, Pratyush Yadav

[PATCH 2/6] completion: clean up the __git_find_on_cmdline() helper function

2019-10-17 Thread SZEDER Gábor
The __git_find_on_cmdline() helper function started its life as __git_find_subcommand() [1], but it served a more general purpose than looking for subcommands, so later it was renamed accordingly [2]. However, that rename didn't touch the body of the function, and left the $subcommand

Re: [PATCH 2/2] Make "git branch -d" prune missing worktrees automatically.

2019-10-17 Thread Eric Sunshine
lete branch 'zonk' checked out at > '/home/pjones/devel/kernel.org/git/zonk' > > It isn't meaningfully checked out, the repo's data is just stale and no > longer reflects reality. Echoing SEZDER's comment on patch 1/2, this behavior is an intentional des

Re: [PATCH 1/2] Make die_if_checked_out() ignore missing worktree checkouts.

2019-10-17 Thread SZEDER Gábor
On Thu, Oct 17, 2019 at 12:28:25PM -0400, Peter Jones wrote: > Currently if you do, for example: > > $ git worktree add path foo > > And "foo" has already been checked out at some other path, but the user > has removed it without pruning, you'll get an error that the branch is > already checked o

[PATCH 1/2] Make die_if_checked_out() ignore missing worktree checkouts.

2019-10-17 Thread Peter Jones
Currently if you do, for example: $ git worktree add path foo And "foo" has already been checked out at some other path, but the user has removed it without pruning, you'll get an error that the branch is already checked out. It isn't meaningfully checked out, the repo's data is just stale and n

[PATCH 2/2] Make "git branch -d" prune missing worktrees automatically.

2019-10-17 Thread Peter Jones
meaningfully checked out, the repo's data is just stale and no longer reflects reality. This makes it so that if nothing is present where a worktree is supposedly checked out, deleting the branch will automatically prune it. Signed-off-by: Peter Jones --- builtin/branch.c |

Re: [PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-17 Thread Junio C Hamano
SZEDER Gábor writes: > However, I'm not sure what the right path should be in the first > place, given that each working tree has its own 'logs' directory, but > only for HEAD's reflog, while everything else goes to the main working > tree's 'logs' directory. As all worktrees should share the sa

Re: [PATCH 1/2] git-gui: implement proc select_path_in_widget

2019-10-16 Thread Birger Skogeng Pedersen
Hi Johannes, On Thu, Oct 17, 2019 at 7:33 AM Johannes Sixt wrote: > FWIW, I would prefer to experiment with the feature for a few weeks > before it (or a configuration that enables it by default) is baked in. Yes please do. Obviously I'm glad someone other than me will be actually testing it. (A

Re: [PATCH 2/6] index-pack: remove redundant parameter

2019-10-16 Thread Jeff King
On Wed, Oct 09, 2019 at 04:44:18PM -0700, Jonathan Tan wrote: > Signed-off-by: Jonathan Tan > --- > builtin/index-pack.c | 26 -- > 1 file changed, 12 insertions(+), 14 deletions(-) Yeah, this seems like a good cleanup. Probably worth explaining in the commit message tha

Re: [PATCH v2 2/3] doc: dissuade users from trying to ignore tracked files

2019-10-16 Thread Jeff King
On Thu, Oct 17, 2019 at 12:53:29AM +, brian m. carlson wrote: > There is no sensible behavior in this case, because sometimes the data > is precious, such as certain configuration files, and sometimes it is > irrelevant data that the user would be happy to discard. > > Since this is not a sup

Re: [PATCH 1/2] git-gui: implement proc select_path_in_widget

2019-10-16 Thread Johannes Sixt
Am 17.10.19 um 07:08 schrieb Birger Skogeng Pedersen: > Hi Pratyush, > > On Wed, Oct 16, 2019 at 9:28 PM Pratyush Yadav wrote: >> I mentioned this earlier, and I'll mention this again: I'm not sure >> whether this feature would be a good thing for the larger population. So >> this _might_ not end

Re: [PATCH 1/2] git-gui: implement proc select_path_in_widget

2019-10-16 Thread Birger Skogeng Pedersen
ople react to > the proposal. I thought I'd let you know to avoid any nasty surprises > later. Could you please elaborate on why you think the feature might be undesired? Why would users not want a staged file to be selected automatically? FWIW I've also got 2 comments on this in GH[

[PATCH v2 2/3] doc: dissuade users from trying to ignore tracked files

2019-10-16 Thread brian m. carlson
It is quite common for users to want to ignore the changes to a file that Git tracks. Common scenarios for this case are IDE settings and configuration files, which should generally not be tracked and possibly generated from tracked files using a templating mechanism. However, users learn about t

Re: [PATCH 1/2] git-gui: implement proc select_path_in_widget

2019-10-16 Thread Pratyush Yadav
On 15/10/19 12:51PM, Birger Skogeng Pedersen wrote: > Hi Pratyush, > > Thanks for reviewing. How does this work, do I send a re-roll of the > patch(es)? Yes, please do. I mentioned this earlier, and I'll mention this again: I'm not sure whether this feature would be a good thing for the larger

Re: [PATCH 2/2] git-gui: select staged on ui_comm focus

2019-10-16 Thread Pratyush Yadav
On 07/10/19 07:11PM, Birger Skogeng Pedersen wrote: > When the user focuses the Commit Message widget (to write a message), the > diff view may be blank. > > With this patch a staged file is automatically selected when the Commit > Message widget is focused, if no other file is selected (i.e. diff

[RFC PATCH 2/7] autostash: extract read_one() from rebase

2019-10-16 Thread Denton Liu
Begin the process of lib-ifying the autostash code. In a future commit, this will be used to implement `--autostash` in other builtins. This patch is best viewed with `--color-moved` and `--color-moved-ws=allow-indentation-change`. Signed-off-by: Denton Liu --- autostash.c | 12 +++

[PATCH v2 2/3] grep: make PCRE2 aware of custom allocator

2019-10-16 Thread Carlo Marcelo Arenas Belón via GitGitGadget
From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= 94da9193a6 (grep: add support for PCRE v2, 2017-06-01) didn't include a way to override the system allocator, and so it is incompatible with custom allocators (e.g. nedmalloc). This problem became obvious when we tried to plug a memory leak

[PATCH 2/3] grep: make PCRE2 aware of custom allocator

2019-10-16 Thread Carlo Marcelo Arenas Belón via GitGitGadget
From: =?UTF-8?q?Carlo=20Marcelo=20Arenas=20Bel=C3=B3n?= 94da9193a6 (grep: add support for PCRE v2, 2017-06-01) didn't include a way to override the system allocator, and so it is incompatible with custom allocators (e.g. nedmalloc). This problem became obvious when we tried to plug a memory leak

Re: [PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-16 Thread SZEDER Gábor
that work as script writers would expect it to. > > Signed-off-by: Johannes Schindelin > --- > path.c | 4 ++-- > t/t1500-rev-parse.sh | 15 +++ > 2 files changed, 17 insertions(+), 2 deletions(-) > > diff --git a/path.c b/path.c > index e3da1f3c4e..ff856

[PATCH 0/2] Handle git_path() with lock files correctly in worktrees

2019-10-16 Thread Johannes Schindelin via GitGitGadget
t1500), but it shouldn't hurt, either. Johannes Schindelin (2): t1400: wrap setup code in test case git_path(): handle `.lock` files correctly path.c| 4 ++-- t/t1400-update-ref.sh | 18 ++ t/t1500-rev-parse.sh | 15 +++ 3 files change

[PATCH 1/2] t1400: wrap setup code in test case

2019-10-16 Thread Johannes Schindelin via GitGitGadget
From: Johannes Schindelin Without this, you cannot use `--run=<...>` to skip that part, and a run with `--run=0` (which is a common way to determine the test case number corresponding to a given test case title). Signed-off-by: Johannes Schindelin --- t/t1400-update-ref.sh | 18 ++-

[PATCH 2/2] git_path(): handle `.lock` files correctly

2019-10-16 Thread Johannes Schindelin via GitGitGadget
v-parse.sh | 15 +++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/path.c b/path.c index e3da1f3c4e..ff85692b45 100644 --- a/path.c +++ b/path.c @@ -268,7 +268,7 @@ static int trie_find(struct trie *root, const char *key, match_fn fn, int result; str

[PATCH 1/2] t3301: test diagnose messages for too few/many paramters

2019-10-15 Thread Doan Tran Cong Danh
if it fails because of number of parameters. If we accidentally lifted the check inside our code base, the test may still failed because the provided parameter is not a valid ref. Correct it. Signed-off-by: Doan Tran Cong Danh --- t/t3301-notes.sh | 6 -- 1 file changed, 4 insertions(+), 2 d

[PATCH 2/2] notes: fix minimum number of parameters to "copy" subcommand

2019-10-15 Thread Doan Tran Cong Danh
g Danh --- Documentation/git-notes.txt | 6 +++--- builtin/notes.c | 2 +- t/t3301-notes.sh| 40 +++-- 3 files changed, 42 insertions(+), 6 deletions(-) diff --git a/Documentation/git-notes.txt b/Documentation/git-notes.txt index f56a5

Re: [PATCH 1/2] git-gui: implement proc select_path_in_widget

2019-10-15 Thread Birger Skogeng Pedersen
Hi Pratyush, Thanks for reviewing. How does this work, do I send a re-roll of the patch(es)? Birger

[PATCH v2 2/6] t3404: set $EDITOR in subshell

2019-10-15 Thread Phillip Wood via GitGitGadget
.sh index c26b3362ef..cb9b21 100755 --- a/t/t3404-rebase-interactive.sh +++ b/t/t3404-rebase-interactive.sh @@ -79,8 +79,11 @@ test_expect_success 'rebase -i with empty HEAD' ' cat >expect <<-\EOF && error: nothing to do EOF - set_fake_edi

[PATCH v6 2/3] format-patch: use enum variables

2019-10-15 Thread Denton Liu
OW 1 -#define THREAD_DEEP 2 -static int thread; +enum cover_setting { + COVER_UNSET, + COVER_OFF, + COVER_ON, + COVER_AUTO +}; + +enum thread_level { + THREAD_UNSET, + THREAD_SHALLOW, + THREAD_DEEP +}; + +static enum thread_level thread; static int do_sig

Re: [PATCH 2/3] sequencer: use run_commit_hook()

2019-10-14 Thread Johannes Schindelin
t.h | 3 --- > >>> sequencer.c | 45 ++--- > >>> sequencer.h | 2 ++ > >>> 4 files changed, 36 insertions(+), 36 deletions(-) > >> > >> Hmm. I would have thought that `commit.c` would be a more logical hom

[PATCH v5 2/3] format-patch: use enum variables

2019-10-14 Thread Denton Liu
) item->string[len] = '\0'; } -#define THREAD_SHALLOW 1 -#define THREAD_DEEP 2 -static int thread; +enum cover_setting { + COVER_UNSET, + COVER_OFF, + COVER_ON, + COVER_AUTO +}; + +enum thread_level { + THREAD_UNSET, + THREAD_SHALLOW, +

Re: [PATCH 2/3] sequencer: use run_commit_hook()

2019-10-14 Thread Phillip Wood
Hi Dscho & Junio On 11/10/2019 05:24, Junio C Hamano wrote: > Johannes Schindelin writes: > >>> builtin/commit.c | 22 -- >>> commit.h | 3 --- >>> sequencer.c | 45 ++--- >&

Re: [PATCH 2/2] merge-recursive: fix merging a subdirectory into the root directory

2019-10-14 Thread Johannes Schindelin
s), I'd be > happy to go through and help switch things over. My suggestion: do not rip apart commands that belong together. The setup phase is often more important to understand than the actually failing command. _Especially_ when the setup test case reports success, but actually failed to set things up as

Re: [PATCH 1/2] git-gui: implement proc select_path_in_widget

2019-10-13 Thread Pratyush Yadav
Hi Birger, Your subject is a bit redundant. A reader of this commit can easily see the diff and know that you implemented "proc select_path_in_widget". What's more important is why you implemented it. That is what should go in the commit message. So for example in this patch, you can say somet

Re: [PATCH 2/2] merge-recursive: fix merging a subdirectory into the root directory

2019-10-12 Thread Elijah Newren
er. It would be really nice, though, if there were some way for me to specify that a given "testcase" was just setup (so that they don't even get a number in the prove output and don't count as a "test" except maybe when they fail), and if there were some way to spe

Re: [PATCH 2/2] merge-recursive: fix merging a subdirectory into the root directory

2019-10-12 Thread Johannes Schindelin
nobody is interested. When a test case reports failure, that's when people pay attention. At least some, including me. The most common case for me (and every other lazy person who relies on CI/PR builds) is when a build breaks, and then I usually get to the trace of the actually failing test case

Re: [PATCH 1/2] merge-recursive: clean up get_renamed_dir_portion()

2019-10-12 Thread Johannes Schindelin
Hi Elijah, On Fri, 11 Oct 2019, Elijah Newren via GitGitGadget wrote: > From: Elijah Newren > > Dscho noted a few things making this function hard to follow. > Restructure it a bit and add comments to make it easier to follow. The > restructurings include: > > * There was a special case if-ch

Re: [PATCH 0/2] Dir rename fixes

2019-10-12 Thread Johannes Schindelin
If you're interested, have a look at the `parsePullRequestDescription()` function in `lib/patch-series.ts` in https://github.com/gitgitgadget/gitgitgadget/. Ciao, Dscho > Elijah Newren (2): > merge-recursive: clean up get_renamed_dir_portion() > merge-recursive: fix merging a subdi

Re: [PATCH v4 2/3] format-patch: use enum variables

2019-10-11 Thread Junio C Hamano
Denton Liu writes: > -#define THREAD_SHALLOW 1 > -#define THREAD_DEEP 2 > -static int thread; > +enum thread_level { > + THREAD_UNSET, > + THREAD_SHALLOW, > + THREAD_DEEP > +}; > +static enum thread_level thread; As the assignment of values do not change

[PATCH 2/2] merge-recursive: fix merging a subdirectory into the root directory

2019-10-11 Thread Elijah Newren via GitGitGadget
-merge-rename-directories.sh | 56 +++++ 2 files changed, 85 insertions(+) diff --git a/merge-recursive.c b/merge-recursive.c index f80e48f623..7bd4a7cf10 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -1931,6 +1931,16 @@ static char *apply_dir_rename(struct dir_rename_

[PATCH 1/2] merge-recursive: clean up get_renamed_dir_portion()

2019-10-11 Thread Elijah Newren via GitGitGadget
From: Elijah Newren Dscho noted a few things making this function hard to follow. Restructure it a bit and add comments to make it easier to follow. The restructurings include: * There was a special case if-check at the end of the function checking whether someone just renamed a file with

[PATCH 0/2] Dir rename fixes

2019-10-11 Thread Elijah Newren via GitGitGadget
directory First patch best viewed with a --histogram diff, which I sadly don't know how to make gitgitgadget generate. Elijah Newren (2): merge-recursive: clean up get_renamed_dir_portion() merge-recursive: fix merging a subdirectory into the root directory merge-recurs

[PATCH v4 2/3] format-patch: use enum variables

2019-10-11 Thread Denton Liu
deletions(-) diff --git a/builtin/log.c b/builtin/log.c index 7d658cecef..f06f5d586b 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -764,24 +764,28 @@ static void add_header(const char *value) item->string[len] = '\0'; } -#define THREAD_SHALLOW 1 -#define THREAD_DEEP

Re: [RFC PATCH 04/10] ewah/bitmap: always allocate 2 more words

2019-10-11 Thread Jeff King
32 or something > > positive, if that's possible.) > > Yeah, thank you for the suggestion. I still wonder why 2 is added > instead of just 1 though. Yeah, I think it should be squashed. I think it is not intentionally 2, it is just that adding "1" to block makes sure

Re: [PATCH v4 1/2] format-patch: create leading components of output directory

2019-10-11 Thread SZEDER Gábor
On Fri, Oct 11, 2019 at 05:47:44PM +0200, Bert Wesarg wrote: > > > > +test_expect_success 'format-patch -o with no leading directories' ' > > > > + rm -fr patches && > > > > + git format-patch -o patches master..side && > > > > + count=$(git rev-list --count master..side) && > > > > +

Re: [PATCH v4 1/2] format-patch: create leading components of output directory

2019-10-11 Thread Bert Wesarg
On Fri, Oct 11, 2019 at 5:45 PM Bert Wesarg wrote: > > On Fri, Oct 11, 2019 at 4:46 PM SZEDER Gábor wrote: > > > > On Fri, Oct 11, 2019 at 10:36:41AM +0200, Bert Wesarg wrote: > > > Changes in v4: > > > * based on dl/format-patch-doc-test-cleanup and adopt it > > > > Thanks... but here I am nit

  1   2   3   4   5   6   7   8   9   10   >