From: Jonathan Nieder <jrnieder@gmail.com>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
"Jiang Xin" <worldhello.net@gmail.com>
Subject: Re: [PATCH 2/6] reflog: remove i18n legos in pruning message
Date: Thu, 31 May 2012 08:45:38 -0500 [thread overview]
Message-ID: <20120531134538.GA10523@burratino> (raw)
In-Reply-To: <1338469482-30936-3-git-send-email-pclouds@gmail.com>
Nguyễn Thái Ngọc Duy wrote:
> --- a/builtin/reflog.c
> +++ b/builtin/reflog.c
> @@ -330,8 +330,12 @@ static int expire_reflog_ent(unsigned char *osha1, unsigned char *nsha1,
> printf("keep %s", message);
> return 0;
> prune:
> - if (!cb->newlog || cb->cmd->verbose)
> - printf("%sprune %s", cb->newlog ? "" : "would ", message);
> + if (!cb->newlog || cb->cmd->verbose) {
> + if (cb->newlog)
> + printf("prune %s", message);
> + else
> + printf("would prune %s", message);
> + }
Thanks. Style: how about
if (!cb->newlog)
printf("would prune %s", message);
else if (cb->cmd->verbose)
printf("prune %s", message);
? I think that would be more readable than the lego original.
BTW I'm not sure if this message would be a good candidate for
translation. Especially in the --dry-run case, it feels like output
that is intended to be simple enough for scripts to parse. (Though on
the other hand, I don't know of any scripts or use cases that actually
parse it, so maybe nobody would mind.)
next prev parent reply other threads:[~2012-05-31 13:45 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 11:20 [PATCH] i18n: apply: split to fix a partial i18n message Jiang Xin
2012-05-31 13:04 ` Nguyễn Thái Ngọc Duy
2012-05-31 13:04 ` [PATCH 1/6] Remove i18n legos in notifying new branch tracking setup Nguyễn Thái Ngọc Duy
2012-05-31 14:00 ` Jonathan Nieder
2012-05-31 13:04 ` [PATCH 2/6] reflog: remove i18n legos in pruning message Nguyễn Thái Ngọc Duy
2012-05-31 13:45 ` Jonathan Nieder [this message]
2012-05-31 14:00 ` Nguyen Thai Ngoc Duy
2012-05-31 14:10 ` Jonathan Nieder
2012-05-31 14:18 ` Nguyen Thai Ngoc Duy
2012-05-31 17:56 ` Junio C Hamano
2012-05-31 20:31 ` Jonathan Nieder
2012-05-31 13:04 ` [PATCH 3/6] merge-recursive: remove i18n legos in conflict messages Nguyễn Thái Ngọc Duy
2012-05-31 13:52 ` Jonathan Nieder
2012-05-31 13:56 ` Nguyen Thai Ngoc Duy
2012-05-31 13:04 ` [PATCH 4/6] notes-merge: remove i18n legos in merge result message Nguyễn Thái Ngọc Duy
2012-05-31 13:04 ` [PATCH 5/6] rerere: remove i18n legos in " Nguyễn Thái Ngọc Duy
2012-05-31 13:04 ` [PATCH 6/6] unpack-trees: remove i18n legos in unpack's porcelain error messages Nguyễn Thái Ngọc Duy
[not found] <0001-Remove-i18n-legos-in-notifying-new-branch-tracking-s.patch>
2012-06-07 12:05 ` [PATCH 1/6] Remove i18n legos in notifying new branch tracking setup Nguyễn Thái Ngọc Duy
2012-06-07 12:05 ` [PATCH 2/6] reflog: remove i18n legos in pruning message Nguyễn Thái Ngọc 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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120531134538.GA10523@burratino \
--to=jrnieder@gmail.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=worldhello.net@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).