{"thread":{"id":"47888","subject":"[BUG] Worktree prune complains about missing path","startedAt":"2018-02-20T20:36:42Z","lastAt":"2018-02-20T23:03:35Z","messageCount":3,"participants":["Randall S. Becker","Eric Sunshine"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"339738","messageId":"005301d3aa8a$80521c70$80f65550$@nexbridge.com","threadId":"47888","inReplyTo":null,"subject":"[BUG] Worktree prune complains about missing path","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2018-02-20T20:36:30Z","receivedAt":"2018-02-20T20:36:42Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"Im a bit confused about this, as I thought I understood worktrees :(.\n\n/home/randall/nsgit/test/test dir.mytest/dest git worktree list\n/home/randall/nsgit/test/test dir.mytest/dest: git worktree list\n/home/randall/nsgit/test/test dir.mytest/dest     4e901ca [master]\n/home/randall/nsgit/test/test dir.mytest/dest.wt  4e901ca [dest.wt]\n\n/home/randall/nsgit/test/test dir.mytest/dest: find . -name dest.wt\n./.git/logs/refs/heads/dest.wt\n./.git/refs/heads/dest.wt\n./.git/worktrees/dest.wt\n/home/randall/nsgit/test/test dir.mytest/dest/.git: cd worktrees/dest.wt\n/home/randall/nsgit/test/test dir.mytest/dest/.git/worktrees/dest.wt: ls\nHEAD  ORIG_HEAD  commondir  gitdir  index  logs\n\n/home/randall/nsgit/test/test dir.mytest/dest/.git/worktrees/dest.wt: cat\ngitdir\n/home/randall/nsgit/test/test dir.mytest/dest.wt/.git\n\n/home/randall/nsgit/test/test dir.mytest/dest/.git/worktrees/dest.wt: ls\nHEAD  ORIG_HEAD  commondir  gitdir  index  logs\n\n/home/randall/nsgit/test/test dir.mytest/dest/.git/worktrees/dest.wt: cd\n../../../..\n/home/randall/nsgit/test/test dir.mytest: rm -rf dest.wt\n/home/randall/nsgit/test/test dir.mytest: cd dest\n/home/randall/nsgit/test/test dir.mytest/dest: git worktree prune -v\nRemoving worktrees/dest.wt: gitdir file points to non-existent location\n\nIt seems like one or two situations are a problem:\n1) Im using a full path for the worktree. \n2) Theres a blank in my path  deliberate tests, yanno.\n\nThis is git 2.16.2. Could anyone shed some light on this?\n\nCheers,\nRandall\n\n\n"},{"id":"339754","messageId":"CAPig+cTHTZT2vRBYbdAgeVg+TDuo_C=mXRXYX4o094VmtygxRQ@mail.gmail.com","threadId":"47888","inReplyTo":"005301d3aa8a$80521c70$80f65550$@nexbridge.com","subject":"Re: [BUG] Worktree prune complains about missing path","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2018-02-20T22:22:11Z","receivedAt":"2018-02-20T22:22:17Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Tue, Feb 20, 2018 at 3:36 PM, Randall S. Becker\n<rsbecker@nexbridge.com> wrote:\n> I’m a bit confused about this, as I thought I understood worktrees :(.\n>\n> /home/randall/nsgit/test/test dir.mytest: rm -rf dest.wt\n> /home/randall/nsgit/test/test dir.mytest/dest: git worktree prune -v\n> Removing worktrees/dest.wt: gitdir file points to non-existent location\n>\n> It seems like one or two situations are a problem:\n> 1) I’m using a full path for the worktree.\n> 2) There’s a blank in my path – deliberate… tests, yanno.\n>\n> This is git 2.16.2. Could anyone shed some light on this?\n\nThis appears to be working as intended. \"git worktree prune\" is\ntelling you that it is pruning the administrative data for the\n\"dest.wt\" worktree (reason: \"worktree location no longer exists\"),\nwhich you intentionally deleted before pruning. It's not clear what it\nis that you find confusing. There is not a lot more I can say without\nunderstanding what behavior you were expecting and how your\nexpectation differs from the actual experience.\n\n(Also, please consider how easy or difficult it is for a reader to\ninterpret your pasted \"sample session\". The one provided is more\nconfusing than necessary due to the command prompt bearing the same\npath information as the output of the \"git worktree list\" command, as\nwell as unnecessary duplicated commands, such as \"ls\", and missing\n\"cd\" commands which do not help to illuminate what it is you are\ntrying to get across. The pasted transcript also contains invalid\ncode-points which render as oddball characters -- or not at all --\nwhich didn't help. Best would be to prepare a minimal example of shell\ncommands to reproduce the behavior you're trying to illustrate.)\n"},{"id":"339762","messageId":"006001d3aa9f$011dab80$03590280$@nexbridge.com","threadId":"47888","inReplyTo":"CAPig+cTHTZT2vRBYbdAgeVg+TDuo_C=mXRXYX4o094VmtygxRQ@mail.gmail.com","subject":"RE: [BUG] Worktree prune complains about missing path","fromName":"Randall S. Becker","fromEmail":"rsbecker@nexbridge.com","sentAt":"2018-02-20T23:03:16Z","receivedAt":"2018-02-20T23:03:35Z","isPatch":false,"sender":{"key":"randall.becker@nexbridge.ca","avatar":"https://avatars.githubusercontent.com/u/28956764?v=4"},"body":"On February 20, 2018 5:22 PM Eric Sunshine wrote:\n> On Tue, Feb 20, 2018 at 3:36 PM, Randall S. Becker\n> <rsbecker@nexbridge.com> wrote:\n> > I’m a bit confused about this, as I thought I understood worktrees :(.\n> >\n> > /home/randall/nsgit/test/test dir.mytest: rm -rf dest.wt\n> > /home/randall/nsgit/test/test dir.mytest/dest: git worktree prune -v\n> > Removing worktrees/dest.wt: gitdir file points to non-existent\n> > location\n> >\n> > It seems like one or two situations are a problem:\n> > 1) I’m using a full path for the worktree.\n> > 2) There’s a blank in my path – deliberate… tests, yanno.\n> >\n> > This is git 2.16.2. Could anyone shed some light on this?\n> \n> This appears to be working as intended. \"git worktree prune\" is telling you\n> that it is pruning the administrative data for the \"dest.wt\" worktree (reason:\n> \"worktree location no longer exists\"), which you intentionally deleted before\n> pruning. It's not clear what it is that you find confusing. There is not a lot\n> more I can say without understanding what behavior you were expecting\n> and how your expectation differs from the actual experience.\n\nI should have been more clear here as to the issue. My bad. The git worktree prune operation does not remove all vestiges of the removed worktree. The following files are retained:\n\n./logs/refs/heads/dest.wt\n./refs/heads/dest.wt\n\nSo, now that I understand in hindsight, these are actually references to the worktree branch 'dest.wt' that obviously remains correctly and properly in git.\n\nAdding:  git branch -D dest.wt    to my test script cleared my (embarrassing) problem of my own doing.\n\n> \n> (Also, please consider how easy or difficult it is for a reader to interpret your\n> pasted \"sample session\". The one provided is more confusing than necessary\n> due to the command prompt bearing the same path information as the\n> output of the \"git worktree list\" command, as well as unnecessary duplicated\n> commands, such as \"ls\", and missing \"cd\" commands which do not help to\n> illuminate what it is you are trying to get across. The pasted transcript also\n> contains invalid code-points which render as oddball characters -- or not at all\n> -- which didn't help. Best would be to prepare a minimal example of shell\n> commands to reproduce the behavior you're trying to illustrate.)\n\nGood point. Again, my bad - very long day debugging. I wanted to show where I was in the directory so I sacrificed brevity for completeness and noise. My apologies.\n\nSo, no bug, just a buggy user.\n\nCheers,\nRandall\n\n"}]}