Re: [PATCH/WIP 0/6] Detached HEADs in new worktrees considered harmful

Started by Junio C Hamano on Jun 15, 2016

open the first message on its own page

Message details and related content
Michael J Gruber [off-list ref] writes:
Before someone loses their HEAD I should put this series out (again).

1/6 is a tiny documentation fix.

2/6 demonstrates that "git prune" in the main worktree loses HEADs in other
worktrees, and vice versa.
You do need to teach the reachability code to consider points that
are outside refs/ (HEAD and index, at least; I also recall there
were talks about per-worktree hierarchies in refs/?) as anchoring
objects to the non-prunable part of the history.

The prune/fsck reachability code already knows to consider objects
that are reachable only from the index as reachable, and I do not
think "rev-list --all" is used to enumerate them for safekeeping
(even when the worktree feature is not used).  The reachability code
that enumerates objects in the index and cache-tree needs to learn
to peek into sibling worktrees' private objects, I would think, and
I do not think the addition is a good match for rev-list.
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help