Re: [PATCH 3/3] Add proof-of-concept %[w(width,in1,in2)<<any-string>>%] implementation
- From
Jakub Narebski <jnareb@gmail.com>
- Date
- Oct 17, 2009, 00:00 UTC
- Message-ID
- <200910170200.03681.jnareb@gmail.com>
- In-Reply-To
- <7v7huurkif.fsf@alter.siamese.dyndns.org>
On Sat, 17 Oct 2009, Junio C Hamano wrote:
Show 16 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes: > > > But even with original w(<width>,<indent1>,<indent2>) we can get output > > of bare "git log" using pretty format... well, almost; it would be the > > same if there was ability to put infinite width, and there doesn't seem > > to be specifier for the whole, unchanged commit message (subject, > > unwrapped + separating lines + body). > > I think I already discussed this when I sent out %s%+b patch. You would > need to adjust and apply both series, but essentially it would become > something like: > > %s%+[w(-1,4,4)%b] > > I.e. a single subject line, potentially followed by a LF and body indented > by 4-place, but the LF will be there only when the body is not empty.
Why not
%[w(-1,4,4)%s%+b]
Or is it
%[w(-1,4,4)%s%+%b]
(i.e. %+ is this empty line between subject and body, if it exists).
The %+x seems a bit strange... but I guess implementing conditional expansion a la shell or rpn spec/queryformat would be out of question (i.e. %?s:+ )...
-- Jakub Narebski Poland