On Feb 24 2023, Jeff King wrote: > If we encounter an error in an index file, we may say something like: > > error: 1234abcd: invalid sha1 pointer in resolve-undo > > But if you have multiple worktrees, each with its own index, it can be > very helpful to know which file had the problem. So let's pass that path > down through the various index-fsck functions and use it where > appropriate. After this patch you should get something like: > > error: 1234abcd: invalid sha1 pointer in resolve-undo of .git/worktrees/wt/index That is still suboptimal, because there is no obvious mapping from the internal worktree name to the directory where it lives (git worktree list doesn't mention the internal name). If you have several worktrees with the same base name in different places, the name under .git/worktrees is just made unique by appending a number. Normally you would want to change to the affected worktree directory to repair it. -- Andreas Schwab, SUSE Labs, schwab@xxxxxxx GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."