Re: git notes: notes
- From
Jeff King <peff@peff.net>
- Date
- Jan 20, 2010, 20:54 UTC
- Message-ID
- <20100120205452.GA8843@coredump.intra.peff.net>
- In-Reply-To
- <20100120203636.GA9221@gnu.kitenet.net>
On Wed, Jan 20, 2010 at 03:36:36PM -0500, Joey Hess wrote:
Show 6 quoted lines
> I was asking hypothetically, trying to point out that parts of git log > seem to make sense to be used as plumbing, with the hope I can continue > to use it that way. > > (Note that git instaweb parses output of git log --pretty=format:%H --raw > like it's plumbing.)
I think this is a valid point. Note that "gitk" uses "git log --pretty=raw". However, I believe it splits the entries on "^commit". So I think there is some precedent for scripting "git log"; it has features that are simply not available through other interfaces. And scripting around "--pretty=raw" seems pretty reasonable to me, too. Why else would you want the raw format?
Is splitting on blank lines an error? I don't think so. The original format was never strictly defined, but given the --pretty=raw format, it seems like a fairly obvious thing to do.
I am inclined to cut the notes output from --pretty=raw, and let callers ask for them explicitly with --show-notes or something similar. We can leave them on by default in the "normal" output. This will still break scripts doing "git log | ./script", but I don't think we have ever condoned that practice.
-Peff