Skip to content

worktree: teach "add" to ignore submodule.recurse config

Philippe Blain via GitGitGadget git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest1 patch 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1worktree: teach "add" to ignore submodule.recurse configbuiltin/worktree.c t/t2400-worktree-add.sh+25 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/1] worktree: teach "add" to ignore submodule.recurse config

"worktree add" internally calls "reset --hard", but if submodule.recurse is set, reset tries to recurse into initialized submodules, which makes start_command try to cd into non-existing submodule paths and die.

Fix that by making sure that the call to reset in "worktree add" does not recurse.

Some remarks:

1. This patch is based on maint

2. The 2 Travis CI macOS builds fail (they also fail on maint) with the message:

> +brew install caskroom/cask/perforce Error: caskroom/cask was moved. Tap homebrew/cask-cask instead. The command "ci/install-dependencies.sh" failed and exited with 1 during .

3. I'm on OS X 10.11.6 (Apple clang-800.0.42.1) and I get a warning

    compiling builtin/merge.c : 
    
    >     CC builtin/merge.o
    builtin/merge.c:831:33: warning: data argument not used by format string [-Wformat-extra-args]
                            no_scissors_editor_comment), comment_line_char);
                            ~~~~~~~~~~~~~~~~~~~~~~~~~~~  ^
    builtin/merge.c:809:4: note: format string is defined here
    N_("An empty message aborts the commit.\n");
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ./gettext.h:86:20: note: expanded from macro 'N_'
    #define N_(msgid) (msgid)
                       ^~~~~
    1 warning generated.
    
    
     This makes me unable to build with DEVELOPER=1.

Philippe Blain (1):
worktree: teach "add" to ignore submodule.recurse config

 builtin/worktree.c      |  2 +-
 t/t2400-worktree-add.sh | 24 ++++++++++++++++++++++++
 2 files changed, 25 insertions(+), 1 deletion(-)

base-commit: 5fa0f5238b0cd46cfe7f6fa76c3f526ea98148d9
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-430%2Fphil-blain%2Fworktree-add-recurse-submodule-config-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-430/phil-blain/worktree-add-recurse-submodule-config-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/430

Signature · 1 line
gitgitgadget