From: Thiago Farina <tfransosi@gmail.com>
To: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Trivial fix: Make all the builtin usage strings to use the same pattern.
Date: Mon, 21 Sep 2009 17:05:35 -0300 [thread overview]
Message-ID: <a4c8a6d00909211305h6c29d88bi9ddf9a7003f5c937@mail.gmail.com> (raw)
In-Reply-To: <pN7ragma8Ra75P8lN7iHuXE6FyUXHXFlnHUVFZqJV4WM7w5mCkVHcQ@cipher.nrlssc.navy.mil>
On Mon, Sep 21, 2009 at 12:28 PM, Brandon Casey
<brandon.casey.ctr@nrlssc.navy.mil> wrote:
> Thiago Farina wrote:
>> They follow the pattern of file name:
>> File name pattern: builtin-command-name.c
>> Usage string pattern: builtin_command_name_usage
>>
>> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
>> ---
>
>> diff --git a/builtin-blame.c b/builtin-blame.c
>> index 7512773..4adae84 100644
>> --- a/builtin-blame.c
>> +++ b/builtin-blame.c
>> @@ -21,10 +21,11 @@
>> #include "parse-options.h"
>> #include "utf8.h"
>>
>> -static char blame_usage[] = "git blame [options] [rev-opts] [rev] [--] file";
>> +static char builtin_blame_usage[] =
>
> Should this one also use 'const'?
It can use const here. I will do this change in the next patch.
>
>> +"git blame [options] [rev-opts] [rev] [--] file";
>>
>> static const char *blame_opt_usage[] = {
>> - blame_usage,
>> + builtin_blame_usage,
>> "",
>> "[rev-opts] are documented in git-rev-list(1)",
>> NULL
>
>> diff --git a/builtin-count-objects.c b/builtin-count-objects.c
>> index 1b0b6c8..fbe0972 100644
>> --- a/builtin-count-objects.c
>> +++ b/builtin-count-objects.c
>> @@ -65,7 +65,7 @@ static void count_objects(DIR *d, char *path, int len, int verbose,
>> }
>> }
>>
>> -static char const * const count_objects_usage[] = {
>> +static char const * const builtin_count_objects_usage[] = {
>
> This one is different from the others. I assume 'char const *' is
> the same as 'const char *', though I'm used to seeing the latter
> form. If we're going for consistency, maybe this should be changed
> too. Ultra minor nit-pick. I noticed it, so I mentioned it, but
> its your choice.
To maintain the consistency I will follow the latter form, since all
others are using "const char *".
Thanks for catching the ones that I missed. I will update them in the
next patch.
next prev parent reply other threads:[~2009-09-21 20:06 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-20 13:17 [PATCH] Trivial fix: Make all the builtin usage strings to use the same pattern Thiago Farina
2009-09-20 14:35 ` Johannes Gilger
2009-09-20 14:51 ` Thiago Farina
2009-09-21 15:28 ` Brandon Casey
2009-09-21 20:05 ` Thiago Farina [this message]
2009-09-21 16:09 ` Johannes Sixt
2009-09-21 21:39 ` Thiago Farina
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=a4c8a6d00909211305h6c29d88bi9ddf9a7003f5c937@mail.gmail.com \
--to=tfransosi@gmail.com \
--cc=brandon.casey.ctr@nrlssc.navy.mil \
--cc=git@vger.kernel.org \
/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).