From: Junio C Hamano <gitster@pobox.com>
To: Andreas Gruenbacher <agruen@suse.de>
Cc: markus.heidelberg@web.de, git@vger.kernel.org
Subject: Re: Missing trailing newline with git log --pretty=format
Date: Wed, 18 Mar 2009 15:27:39 -0700 [thread overview]
Message-ID: <7vzlfibh5w.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <200903182304.51387.agruen@suse.de> (Andreas Gruenbacher's message of "Wed, 18 Mar 2009 23:04:51 +0100")
Andreas Gruenbacher <agruen@suse.de> writes:
> On Wednesday, 18 March 2009 22:56:43 Markus Heidelberg wrote:
>> Use tformat instead of format.
>
> Hmm ... didn't know that, thanks. Now I wonder why anyone would ever want
> format instead of tformat ;)
If your payload is multi-line, you would want to see a separating empty
line in between entries, but not after the last one:
$ command with --format
The first line of first entry.
The second line of first entry.
...
The last line of first entry.
The first line of second entry.
...
...
The last line of last entry.
$ notice there is no extra newline after that
That is what --format does. One-line-per-entry is a special case. You do
not want a "separating LF in between entries", but a "terminating LF after
each entry". T in --tformat stands for this "terminating" aspect, as
opposed to the "separator" behaviour --format gives you.
prev parent reply other threads:[~2009-03-18 22:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 21:23 Missing trailing newline with git log --pretty=format Andreas Gruenbacher
2009-03-18 21:56 ` Markus Heidelberg
2009-03-18 22:04 ` Andreas Gruenbacher
2009-03-18 22:27 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vzlfibh5w.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=agruen@suse.de \
--cc=git@vger.kernel.org \
--cc=markus.heidelberg@web.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).