Re: Re: [PATCH] Add `%B' in format strings for raw commit body in `git log' and friends
- From
Eli Barzilay <eli@barzilay.org>
- Date
- Apr 5, 2010, 06:06 UTC
- Message-ID
- <19385.32203.489776.418681@winooski.ccs.neu.edu>
- In-Reply-To
- <7vljd2y9c2.fsf@alter.siamese.dyndns.org>
On Apr 4, Junio C Hamano wrote:
Show 14 quoted lines
> Eli Barzilay <eli@barzilay.org> writes: > > > On Apr 4, Junio C Hamano wrote: > >> Isn't this the same as "%s%n%+b"? > > > > The problem with that is that it wraps the first paragraph. So it's > > fine as long as it's always used as a subject line. > > > > (I'm migrating a project to git, and some people will never remember > > to do that.) > > Ok, but then "rev-list --pretty=format:%B" would not be as a good > tool for migration to begin with (imagine a log message that begins > with "commit"), compared to say "rev-list --pretty=raw".
Ah, sorry -- I phrased that poorely. We're doing the actual migration with git-svn, so that's not the problem. The relation to migrating is that people are not used to using the first paragraph as a subject line, which means that there will be commit messages that look like:
Fix foo, which means: 1. Do this, 2. Do that, 3. Remove bar.
and such messages come out really ugly. If a project is well behaved in regards to commit messages always having a subject line, then there's no big problem, of course. (It can be a little worse if I have scripts that look for lines with a specific format like commands for a bug tracking system.)
> It also feels a bit funny to list %B that doesn't do the paragraph > pretty-printing in pretty-formats.txt documentation ;-) but that is > not an objection.
(Well, my understanding was that the pretty formats is about the format strings in general.)
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!