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

rev-list --parents --full-history + path: something's fishy

From
Johannes Sixt <johannes.sixt@telecom.at>
Date
May 24, 2008, 20:16 UTC
Message-ID
<1211660214.483877b69a107@webmail.nextra.at>
In-Reply-To
<e1dab3980805230808s59798351r9ed702c7d0dedd2a@mail.gmail.com>
This script creates this history:
    C--M
   /  /
  A--B
Commits A and B modify file a.

git init echo a > a git add a git commit -m A echo 1 > a git commit -m B -a git checkout -b side master~1 echo b > b git add b git commit -m C git merge master

At this point, this command returns the expected output (SHA1s rewritten to A,B,C,M as above):

$ git rev-list --full-history HEAD -- a B A

but this does not:

$ git rev-list --full-history --parents HEAD -- a M A B B A A

Of course, I'd expected to see this:

$ git rev-list --full-history --parents HEAD -- a B A A

Just as a heads-up, I've also seen a case (in David's repository) where a
git rev-list --full-history --parents --reverse HEAD -- some/path

incorrectly prints a commit somewhere in the middle *without* a parent where it definitely should have printed a parent. I don't have a repeatable small test-case, yet.

-- Hannes
Next: Linus Torvalds
Message 1 of 9 in “rev-list --parents --full-history + path: something's fishy”
  1. Johannes SixtMay 24, 2008
  2. Linus TorvaldsMay 25, 2008
  3. Johannes SixtMay 25, 2008
  4. Linus TorvaldsMay 25, 2008
  5. Revert "filter-branch: subdirectory filter needs --full-history"Johannes Sixt, May 26, 2008
  6. David TweedMay 27, 2008
  7. Junio C HamanoMay 28, 2008
  8. Johannes SixtMay 25, 2008
  9. Linus TorvaldsMay 25, 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.