All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: "Ross Lagerwall" <rosslagerwall@gmail.com>,
	git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: [PATCH] rev-parse --show-prefix: add in trailing newline
Date: Tue, 10 Apr 2012 10:56:05 -0700	[thread overview]
Message-ID: <7vty0rpj2i.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120410173616.GA4300@burratino> (Jonathan Nieder's message of "Tue, 10 Apr 2012 12:36:16 -0500")

Jonathan Nieder <jrnieder@gmail.com> writes:

> (cc-ing Duy)
> Hi,
>
> Ross Lagerwall wrote:
>
>> --- a/builtin/rev-parse.c
>> +++ b/builtin/rev-parse.c
>> @@ -634,6 +634,8 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
>>  			if (!strcmp(arg, "--show-prefix")) {
>>  				if (prefix)
>>  					puts(prefix);
>> +				else
>> +					putchar('\n');
>>  				continue;
>
> This makes the output more consistent but it is a little puzzling how
> it does that.  Why is prefix NULL instead of "" when we are at the
> toplevel of the worktree?

Interesting point ;-)

  reply	other threads:[~2012-04-10 17:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 13:27 [PATCH] rev-parse --show-prefix: add in trailing newline Ross Lagerwall
2012-04-09 19:07 ` Junio C Hamano
2012-04-10  5:30   ` Ross Lagerwall
2012-04-10 14:04   ` Jonathan Nieder
2012-04-10 14:41   ` Andreas Schwab
2012-04-10 16:14     ` Junio C Hamano
2012-04-10 17:36 ` Jonathan Nieder
2012-04-10 17:56   ` Junio C Hamano [this message]
2012-04-10 22:51   ` Nguyen Thai Ngoc Duy

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=7vty0rpj2i.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=rosslagerwall@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.