threads / bug / 48034

Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

Subject: Re: Bug in "revision.c: --all adds HEAD from all worktrees" ?

## tl;dr

2 messages between Mar 13, 2018 and Mar 13, 2018.

replies: 1people: 2as markdown or json

Stan Hu· Mar 13, 2018, 18:23 UTC · lore
To be clear, this is how I think we got into this state:
We have worktrees that are created to squash and rebase a branch. They were left around inadvertently for one reason or another.
Since we were using git v2.14.3, a git gc would prune dangling objects because it never saw that a worktree still had a reference to it. Now, in git v2.15+, worktrees are examined, and a git gc won't garbage collect any objects referenced by a worktree.
Another words, the failure of git v2.14 to preserve these objects caused problems with these stale worktrees with the upgrade to v2.15+.
Ævar Arnfjörð Bjarmason· Mar 13, 2018, 20:29 UTC · re: Stan Hu · lore
On Tue, Mar 13 2018, Stan Hu jotted:
Show 7 quoted lines
> To be clear, this is how I think we got into this state:
>
> We have worktrees that are created to squash and rebase a branch. They were left around inadvertently for one reason or another.
>
> Since we were using git v2.14.3, a git gc would prune dangling objects because it never saw that a worktree still had a reference to it. Now, in git v2.15+, worktrees are examined, and a git gc won't garbage collect any objects referenced by a worktree.
>
> Another words, the failure of git v2.14 to preserve these objects caused problems with these stale worktrees with the upgrade to v2.15+.

Thanks, I hadn't dug into the root cause. Good to know it's not some failure mode we're still producing, just the result of past bugs.

← back to recent threads