Re: [RFC/PATCH 1/4] Add git-sequencer shell prototype
- From
Stephan Beyer <s-beyer@gmx.net>
- Date
- Jul 3, 2008, 21:12 UTC
- Message-ID
- <20080703211230.GD6677@leksak.fem-net>
- In-Reply-To
- <m3d4lvf70w.fsf@localhost.localdomain>
Hi,
first, thanks for the --root idea ;-)
> BTW. what is best way of checking if given revision is parent-less?
I think count the number of parents is quite sane.
In sequencer I have:
count_parents() {
git cat-file commit "$1" | sed -n -e '1,/^$/p' | grep -c '^parent'
}Regards, Stephan
-- Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F