Thread (2 messages) flat view 2 messages, 2 authors, 2016-06-15

Re: [PATCH] git-gui: give more advice when detaching HEAD

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:33

Jeff King [off-list ref] writes:
Is it that cheap? A full reachability check for something that is not in
any ref would involve going to the roots, wouldn't it?
You only need to dig until you hit a merge base, no?

In this case, you would need to compute just one merge base, between the
commit you are about to leave, and the (imaginary) commit that is a merge
across all the tips of your refs.  If the merge base is the commit you are
about to leave, you were sightseeing in the past without creating anything
new, otherwise you will lose commits between the computed base and the
commit you are about to leave.

And merge-base has an interface to compute exactly that, I think.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help