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