From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Jan Krüger" <jk@jk.gs>,
git@vger.kernel.org, "Randal L. Schwartz" <merlyn@stonehenge.com>,
"Thomas Rast" <trast@student.ethz.ch>,
"Andreas Schwab" <schwab@linux-m68k.org>
Subject: Re: [PATCH] log-tree: use custom line terminator in line termination mode
Date: Tue, 1 May 2012 04:56:49 -0400 [thread overview]
Message-ID: <20120501085649.GD4998@sigill.intra.peff.net> (raw)
In-Reply-To: <7vaa1tf1w8.fsf@alter.siamese.dyndns.org>
On Mon, Apr 30, 2012 at 12:36:07PM -0700, Junio C Hamano wrote:
> Jan Krüger <jk@jk.gs> writes:
>
> > When using a custom format in line termination mode (as opposed to line
> > separation mode), the configured line terminator is not used, so things
> > like "git log --pretty=tformat:%H -z" do not work properly.
> >
> > Make it use the line terminator the user ordered.
> >
> > Signed-off-by: Jan Krüger <jk@jk.gs>
> > ---
> > log-tree.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/log-tree.c b/log-tree.c
> > index 34c49e7..44f0268 100644
> > --- a/log-tree.c
> > +++ b/log-tree.c
> > @@ -682,7 +682,7 @@ void show_log(struct rev_info *opt)
> > if (opt->use_terminator) {
> > if (!opt->missing_newline)
> > graph_show_padding(opt->graph);
> > - putchar('\n');
> > + putchar(opt->diffopt.line_termination);
> > }
> >
> > strbuf_release(&msgbuf);
>
> Looks sensible. Perhaps we would want to add a test?
Hmm. This came up before, and the issue is (or can be) slightly more
complex:
http://thread.gmane.org/gmane.comp.version-control.git/122478/focus=122568
-Peff
next prev parent reply other threads:[~2012-05-01 8:56 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-30 17:58 git log -z still outputting newlines? Randal L. Schwartz
2012-04-30 18:34 ` Andreas Schwab
2012-04-30 19:02 ` Thomas Rast
2012-04-30 18:45 ` [PATCH] log-tree: use custom line terminator in line termination mode Jan Krüger
2012-04-30 19:36 ` Junio C Hamano
2012-04-30 20:28 ` [PATCH v2] " Jan Krüger
2012-04-30 22:58 ` Junio C Hamano
2012-04-30 23:28 ` Jan Krüger
2012-05-01 0:28 ` Andreas Schwab
2012-05-01 0:43 ` Junio C Hamano
2012-05-01 7:29 ` Andreas Schwab
2012-05-01 2:51 ` Randal L. Schwartz
2012-05-01 4:27 ` Junio C Hamano
2012-05-01 8:56 ` Jeff King [this message]
2012-05-01 16:12 ` [PATCH] " Junio C Hamano
2012-05-01 17:06 ` Junio C Hamano
2012-05-01 20:03 ` Junio C Hamano
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=20120501085649.GD4998@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jk@jk.gs \
--cc=merlyn@stonehenge.com \
--cc=schwab@linux-m68k.org \
--cc=trast@student.ethz.ch \
/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).