git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Blain via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH 0/1] worktree: teach "add" to ignore submodule.recurse config
Date: Sun, 27 Oct 2019 17:16:24 +0000	[thread overview]
Message-ID: <pull.430.git.1572196585.gitgitgadget@gmail.com> (raw)

"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
-- 
gitgitgadget

             reply	other threads:[~2019-10-27 17:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-27 17:16 Philippe Blain via GitGitGadget [this message]
2019-10-27 17:16 ` [PATCH 1/1] " Philippe Blain via GitGitGadget
2019-10-28  2:26 ` [PATCH 0/1] " Junio C Hamano
2019-10-29 12:33   ` Philippe Blain
2019-10-30  1:01     ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.430.git.1572196585.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --subject='Re: [PATCH 0/1] worktree: teach "add" to ignore submodule.recurse config' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).