From: Junio C Hamano <gitster@pobox.com>
To: Pieter de Bie <pdebie@ai.rug.nl>
Cc: Git Mailinglist <git@vger.kernel.org>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH] git-name-rev: allow --name-only in combination with --stdin
Date: Fri, 01 Aug 2008 00:23:27 -0700 [thread overview]
Message-ID: <7vtze5td00.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1217510434-94979-1-git-send-email-pdebie@ai.rug.nl> (Pieter de Bie's message of "Thu, 31 Jul 2008 15:20:34 +0200")
Pieter de Bie <pdebie@ai.rug.nl> writes:
> Signed-off-by: Pieter de Bie <pdebie@ai.rug.nl>
> ---
>
> Or was there a specific reason not to allow this?
I'll let Dscho answer that one.
> diff --git a/builtin-name-rev.c b/builtin-name-rev.c
> index 85612c4..0536af4 100644
> --- a/builtin-name-rev.c
> +++ b/builtin-name-rev.c
> @@ -266,8 +266,14 @@ int cmd_name_rev(int argc, const char **argv, const char *prefix)
> if (!name)
> continue;
>
> - fwrite(p_start, p - p_start + 1, 1, stdout);
> - printf(" (%s)", name);
> + if (data.name_only) {
> + fwrite(p_start, p - p_start + 1 - 40, 1, stdout);
> + printf(name);
> + }
> + else {
> + fwrite(p_start, p - p_start + 1, 1, stdout);
> + printf(" (%s)", name);
> + }
> p_start = p + 1;
> }
> }
Is it just me to find that this part is getting indented too deeply to be
readable?
next prev parent reply other threads:[~2008-08-01 7:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-31 13:20 [PATCH] git-name-rev: allow --name-only in combination with --stdin Pieter de Bie
2008-08-01 7:23 ` Junio C Hamano [this message]
2008-08-01 10:57 ` Johannes Schindelin
2008-08-01 11:16 ` [PATCH] builtin-name-rev: refactor stdin handling to its own function Pieter de Bie
2008-08-01 19:07 ` Junio C Hamano
2008-08-02 18:12 ` [PATCH] git-name-rev: allow --name-only in combination with --stdin Junio C Hamano
2008-08-03 13:44 ` [PATCH] git-name-rev: don't use printf without format René Scharfe
2008-08-03 20:44 ` 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=7vtze5td00.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=pdebie@ai.rug.nl \
/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).