log --graph --first-parent weirdness
- From
- Teemu Likonen <tlikonen@iki.fi>
- Date
- Jun 4, 2008, 15:00 UTC
- Message-ID
- <20080604150042.GA3038@mithlond.arda.local>
The output of "git log --graph --first-parent" seems weird. Maybe it's because I don't understand everything but here's an example anyway:
$ git log --graph --pretty=oneline --abbrev-commit --decorate
M 2ba1dba... (refs/heads/master) Merge branch 'topic' |\ | * 432e062... (refs/heads/topic) Change from branch 'topic' * | b762236... Change from branch 'master' |/ * d7fb80a... Initial commit
Normal --first-parent prints this:
$ git log --first-parent --pretty=oneline --abbrev-commit
2ba1dba... Merge branch 'topic' b762236... Change from branch 'master' d7fb80a... Initial commit
With --graph it goes:
$ git log --graph --first-parent --pretty=oneline --abbrev-commit
M 2ba1dba... Merge branch 'topic' |\ * | b762236... Change from branch 'master' * | d7fb80a... Initial commit /
So, it prints the second parent line but it leads to nowhere. Try the same with the git repository and you'll see a _lots_ of parallel branch lines which seem to go nowhere.