Re: A shortcoming of the git repo format
- From
Petr Baudis <pasky@ucw.cz>
- Date
- Apr 27, 2005, 19:39 UTC
- Message-ID
- <20050427193903.GG22956@pasky.ji.cz>
- In-Reply-To
- <20050427183239.GE19011@redhat.com>
Dear diary, on Wed, Apr 27, 2005 at 08:32:40PM CEST, I got a letter where Dave Jones <davej@redhat.com> told me that...
Show 5 quoted lines
> That actually broke one of my first git scripts when one of the > changelog texts started a line with 'tree '. I hacked around it > by making my script only grep in the 'head -n4' lines, but this > seems somewhat fragile having to make assumptions that the field > I want to see is in the first 4 lines.
The tree field is now always at the first line, but generally the header part is variable-sized; you have multiple parent lines in case of merges.
Just stop reading at the first newline.
-- Petr "Pasky" Baudis Stuff: http://pasky.or.cz/ C++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor