From: Thiago Farina <tfransosi@gmail.com>
To: Ramana Kumar <ramana.kumar@gmail.com>
Cc: git@vger.kernel.org, gitster@pobox.com
Subject: Re: [PATCH] Make commit help text more accurate for --verbose
Date: Sun, 5 Sep 2010 12:06:33 -0300 [thread overview]
Message-ID: <AANLkTinEZ92S_XB4zrnb26eVR-MFsDQcSPAZ3RXj6ofH@mail.gmail.com> (raw)
In-Reply-To: <1283680383-12495-1-git-send-email-ramana.kumar@gmail.com>
Hi Ramana,
Some *style* comments below.
On Sun, Sep 5, 2010 at 6:53 AM, Ramana Kumar <ramana.kumar@gmail.com> wrote:
> fprintf(fp,
> "\n"
> "# Please enter the commit message for your changes.");
> - if (cleanup_mode == CLEANUP_ALL)
> + if (cleanup_mode == CLEANUP_ALL && !verbose)
> fprintf(fp,
> " Lines starting\n"
> "# with '#' will be ignored, and an empty"
> " message aborts the commit.\n");
The Documentation/CodingStyle says to avoid using braces unncessary.
But since this is not a single line statement, like:
if (foo)
foo = x;
Could you wrapp this into { } ?
> - else /* CLEANUP_SPACE, that is. */
> - fprintf(fp,
> - " Lines starting\n"
> - "# with '#' will be kept; you may remove them"
> - " yourself if you want to.\n"
> - "# An empty message aborts the commit.\n");
> + else {
> + if (cleanup_mode == CLEANUP_ALL)
> + fprintf(fp,
> + " Lines starting\n"
> + "# with '#' will be ignored, as will"
> + " the diff and anything below it.\n");
Same thing here (and below) as pointed above.
> + else { /* CLEANUP_SPACE, that is. */
> + fprintf(fp,
> + " Lines starting\n"
> + "# with '#' will be kept; you may remove them"
> + " yourself if you want to.\n");
> + if (verbose)
> + fprintf(fp,
> + "# The diff and anything below it will be ignored.\n");
> + }
> + fprintf(fp, "# An empty message aborts the commit.\n");
> + }
> if (only_include_assumed)
> fprintf(fp, "# %s\n", only_include_assumed);
>
next prev parent reply other threads:[~2010-09-05 15:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-05 9:53 [PATCH] Make commit help text more accurate for --verbose Ramana Kumar
2010-09-05 15:06 ` Thiago Farina [this message]
2010-09-05 16:30 ` Ævar Arnfjörð Bjarmason
2010-09-14 9:08 ` Ramana Kumar
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=AANLkTinEZ92S_XB4zrnb26eVR-MFsDQcSPAZ3RXj6ofH@mail.gmail.com \
--to=tfransosi@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ramana.kumar@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 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).