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

rev-list --reverse --full-history --parents with path limiter disconnects history

From
Johannes Sixt <j.sixt@viscovery.net>
Date
Aug 21, 2008, 16:27 UTC
Message-ID
<48AD9786.80707@viscovery.net>

Attached is a repository (to be imported via git fast-import) that has such a history:

o--o--A--B--o
 \           \
  o--o--C-----M--o--X   <- master

where the A,B,C touch path P2 such that P2 is the same after B and C. Commit X touches P2 as well.

This command does not give the expected result: It reports *two* initial commits and one merge; in particular, commit X is reported as initial commit.

$ git rev-list --parents --reverse --full-history master -- P2

This command gives the expected result, i.e. there is one initial commit, one merge, and some more regular commits:

$ git rev-list --parents --full-history master -- P2

And this works as well, i.e there is a linear history that omits the branch via C:

$ git rev-list --parents --reverse master -- P2
Please help!

BTW, I've observed this behavior earlier when I debugged David Tweed's repository, after which we removed --full-history from git-filter-branch. But I could not easily find a simple history that exposes the problem. Now I have such a history.

BTW2, using --simplify-merges instead of --full-history has the same problem (but I don't think that comes as a surprise).

-- Hannes
Next: Thomas Rast
Message 1 of 4 in “rev-list --reverse --full-history --parents with path limiter disconnects history”
  1. Johannes SixtAug 21, 2008
  2. rev-list: fix --reverse interaction with --parentsThomas Rast, Aug 29, 2008
  3. Johannes SixtAug 29, 2008
  4. Junio C HamanoAug 31, 2008

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.