Re: [PATCH] revision: --ancestry-path
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 21, 2010, 08:49 UTC
- Message-ID
- <7v8w8hchrv.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <7vochdcjz5.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
> I am reasonably sure that parents (specifically, "rewrite_parents") is > broken. The new function should cull parents that do not appear on the > ancestry path from merges (that is what "NEEDSWORK" is about). It may or > may not break gitk, though---these off-path parents are shown as parents > of an on-path merge but will be marked as UNINTERESTING.
Thinking about it a bit more, I think this is Ok, as all the ancestors on a side branch that is off-path are marked uninteresting, and we do show uninteresting parents in the output of an interesting commit. In fact, if you do "rev-list --parents HEAD^..HEAD -- .", on a non-merge non-empty commit, you will see uninteresting HEAD^ shown as the parent of HEAD.
> This is not a new problem, but I strongly suspect that cherry-pick is > broken the same way wrt "rewrite_parents".
This is a different and a real issue. By marking ones that are duplicate of commits from the other side as SHOWN, we will spit out a disconnected history. It should rewrite the parent list so that children of a commit that is removed due to being a duplicate from the other side point at an ancestor of that removed commit to keep the history connected.