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

Re: [BUG] Worktree prune complains about missing path

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Feb 20, 2018, 22:22 UTC
Message-ID
<CAPig+cTHTZT2vRBYbdAgeVg+TDuo_C=mXRXYX4o094VmtygxRQ@mail.gmail.com>
In-Reply-To
<005301d3aa8a$80521c70$80f65550$@nexbridge.com>

On Tue, Feb 20, 2018 at 3:36 PM, Randall S. Becker <rsbecker@nexbridge.com> wrote:

Show 11 quoted lines
> I’m a bit confused about this, as I thought I understood worktrees :(.
>
> /home/randall/nsgit/test/test dir.mytest: rm -rf dest.wt
> /home/randall/nsgit/test/test dir.mytest/dest: git worktree prune -v
> Removing worktrees/dest.wt: gitdir file points to non-existent location
>
> It seems like one or two situations are a problem:
> 1) I’m using a full path for the worktree.
> 2) There’s a blank in my path – deliberate… tests, yanno.
>
> This is git 2.16.2. Could anyone shed some light on this?

This appears to be working as intended. "git worktree prune" is telling you that it is pruning the administrative data for the "dest.wt" worktree (reason: "worktree location no longer exists"), which you intentionally deleted before pruning. It's not clear what it is that you find confusing. There is not a lot more I can say without understanding what behavior you were expecting and how your expectation differs from the actual experience.

(Also, please consider how easy or difficult it is for a reader to interpret your pasted "sample session". The one provided is more confusing than necessary due to the command prompt bearing the same path information as the output of the "git worktree list" command, as well as unnecessary duplicated commands, such as "ls", and missing "cd" commands which do not help to illuminate what it is you are trying to get across. The pasted transcript also contains invalid code-points which render as oddball characters -- or not at all -- which didn't help. Best would be to prepare a minimal example of shell commands to reproduce the behavior you're trying to illustrate.)

Previous: Randall S. BeckerNext: Randall S. Becker
Message 2 of 3 in “[BUG] Worktree prune complains about missing path”
  1. Randall S. BeckerFeb 20, 2018
  2. Eric SunshineFeb 20, 2018
  3. Randall S. BeckerFeb 20, 2018

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.