git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] worktree add: shouldn't dwim if -b or -B is given

From
Yoichi Nakayama <yoichi.nakayama@gmail.com>
Date
Aug 5, 2026, 12:30 UTC
Message-ID
<CAF5D8-sca=qutDYH=SZEjZsWFGkFAVLiJZz27jzUOfhvi3LWKQ@mail.gmail.com>
In-Reply-To
<pull.2192.v2.git.1785932208004.gitgitgadget@gmail.com>

On Wed, Aug 5, 2026 at 9:16 PM Yoichi NAKAYAMA via GitGitGadget <gitgitgadget@gmail.com> wrote:

Show 17 quoted lines
> Range-diff vs v1:
>
>  1:  908a32fb56 ! 1:  b00f6c2fa1 worktree add: shouldn't dwim if -b or -B is given
>      @@ Metadata
>        ## Commit message ##
>           worktree add: shouldn't dwim if -b or -B is given
>
>      -    'git worktree add <path> <branch>' DWIMs <branch> to a
>      +    git worktree add <path> <branch> DWIMs <branch> to a
>           remote-tracking branch when neither -b, -B, nor --detach
>           is given.
>
>      -    However, 'git worktree add -b <new-branch> <path> <branch>' can
>      +    However, git worktree add -b <new-branch> <path> <branch> can
>           still DWIM <branch>, causing <new-branch> to be ignored.
>
>           This is a regression introduced in v2.42.0
I accidentally removed the quotes in the commit message. I'll fix it.
-- 
Yoichi NAKAYAMA
Previous: Yoichi NAKAYAMA via GitGitGadgetNext: Yoichi Nakayama
Message 5 of 10 in “worktree add: shouldn't dwim if -b or -B is given”
  1. worktree add: shouldn't dwim if -b or -B is givenYoichi NAKAYAMA via GitGitGadget, Aug 4, 2026
  2. Junio C HamanoAug 4, 2026
  3. Yoichi NakayamaAug 5, 2026
  4. worktree add: shouldn't dwim if -b or -B is givenYoichi NAKAYAMA via GitGitGadget, Aug 5, 2026
  5. Yoichi NakayamaAug 5, 2026
  6. Yoichi NakayamaAug 19, 2026
  7. worktree add: shouldn't dwim if -b or -B is givenYoichi NAKAYAMA via GitGitGadget, Aug 5, 2026
  8. Junio C HamanoAug 5, 2026
  9. worktree add: shouldn't dwim if -b or -B is givenYoichi NAKAYAMA via GitGitGadget, Aug 20, 2026
  10. Junio C HamanoAug 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.