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

misleading message printed when worktree add fails

From
BBBaruch Burstein <bmburstein@gmail.com>
Date
Nov 28, 2021, 06:50 UTC
Message-ID
<CA+34VNLj6VB1kCkA=MfM7TZR+6HgqNi5-UaziAoCXacSVkch4A@mail.gmail.com>

Thank you for filling out a Git bug report! Please answer the following questions to help us understand your issue.

What did you do before the bug happened? (Steps to reproduce your issue)

run `git worktree add <path> <branch>`, where <branch> is an already checked-out branch

What did you expect to happen? (Expected behavior)
fail to create worktree
What happened instead? (Actual behavior)

worktree was not created, but a confusing message was printed: "Preparing worktree (checking out '<branch>')"

What's different between what you expected and what actually happened?

The printed message seems to indicate that the command was a success, when in fact it was not

Anything else you want to add:

Please review the rest of the bug report below. You can delete any lines you don't wish to share.

[System Info] git version: git version 2.33.1.windows.1 cpu: x86_64 built from commit: 05d80adb775077d673fab685009ede4a1003ed92 sizeof-long: 4 sizeof-size_t: 8 shell-path: /bin/sh feature: fsmonitor--daemon uname: Windows 10.0 18363 compiler info: gnuc: 10.3 libc info: no libc information available $SHELL (typically, interactive shell): C:\Program Files\Git\usr\bin\bash.exe

Next: Eric Sunshine
Message 1 of 6 in “misleading message printed when worktree add fails”
  1. Baruch BursteinNov 28, 2021
  2. Eric SunshineNov 28, 2021
  3. Baruch BursteinNov 28, 2021
  4. Eric SunshineNov 28, 2021
  5. rsbecker@nexbridge.comNov 28, 2021
  6. Eric SunshineNov 30, 2021

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.