git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Junio C Hamano
Message 11 of 11 in “Getting 'git log' (or something else) to show me the relevant sub-graph?”
  1. Johan HerlandApr 20, 2010
  2. Michael J GruberApr 20, 2010
  3. Junio C HamanoApr 20, 2010
  4. revision: --ancestry-pathJunio C Hamano, Apr 20, 2010
  5. Johan HerlandApr 21, 2010
  6. Johannes SixtApr 21, 2010
  7. Junio C HamanoApr 21, 2010
  8. revision: --ancestry-pathJunio C Hamano, Apr 21, 2010
  9. Johan HerlandApr 21, 2010
  10. Junio C HamanoApr 21, 2010
  11. Junio C HamanoApr 21, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.