From: Jakub Narebski <jnareb@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Heikki Orsila <heikki.orsila@iki.fi>, git@vger.kernel.org
Subject: Re: [PATCH] Start conforming code to "git subcmd" style
Date: Sun, 31 Aug 2008 02:32:05 -0700 (PDT) [thread overview]
Message-ID: <m38wudr0mq.fsf@localhost.localdomain> (raw)
In-Reply-To: <7vwshyfctu.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
> Heikki Orsila <heikki.orsila@iki.fi> writes:
>
> > User notifications are presented as 'git cmd', and code comments
> > are presented as '"cmd"' or 'git's cmd', rather than 'git-cmd'.
...
> > diff --git a/builtin-apply.c b/builtin-apply.c
> > ...
> > @@ -506,17 +506,17 @@ static char *gitdiff_verify_name(const char *li
> > ...
> > - die("git-apply: bad git-diff - expected /dev/nu...
> > + die("git apply: bad git-diff - expected /dev/nu...
> > ...
> > - die("git-apply: bad git-diff - inconsistent %s ...
> > + die("git apply: bad git-diff - inconsistent %s ...
> > ...
> > - die("git-apply: bad git-diff - expected /dev/nu...
> > + die("git apply: bad git-diff - expected /dev/nu...
> > ...
>
> I'd vote for doing "s/git-diff/patch/" here. After looking at
> builtin-apply.c, there is no other error/die messages that would become
> ambiguous, so such a rewording won't make it harder to help people who saw
> any of these error messages (or other error messages from the "git-apply"
> program).
I agree. git-apply in general is presented a patch output, not
necessary git-diff output (it could be output generated by GNU diff,
or by 'scm diff' from some SCM...).
> > diff --git a/builtin-blame.c b/builtin-blame.c
> > ...
> > @@ -2299,12 +2299,12 @@ int cmd_blame(int argc, const char **argv, co...
> > ...
> > - OPT_BIT(..."Use the ... as git-annotate (Default: off)"...
> > + OPT_BIT(..."Use the ... as git annotate (Default: off)"...
> > ...
> > - OPT_STRING(..."Use ...instead of calling git-rev-list"),
> > + OPT_STRING(..."Use ...instead of calling git rev-list"),
> > ...
>
> A two-word command name in a prose is hard to read; "rev-list" is not a
> word and that makes the problem less serious, but it would be easier to
> read if these two word command names are quoted or grouped together in
> some way to make it clear they form a single noun and the sentence is
> talking about a single "thing".
>
> The old "git-foo" spelling was good for that purpose, but it will invite
> user confusion so we cannot use it anymore. Perhaps we can say "instead
> of calling 'git rev-list'"?
Either "git-rev-list" or "'git rev-list'" is fine; "git rev-list"
is not, as it requires careful reading to notice which part is
proposed git command, and which the rest of message.
> The command name at the beginning of die message does not have this issue.
> E.g. the colon in:
>
> die("git foo: I hate you");
>
> is sufficient to make it clear that these two words form a single noun;
> i.e. "I'm 'git foo' program, and I am telling you that I hate you".
>
> But it might be just me, so before asking you to reroll another round, I'd
> like to hear opinions from the list.
>
> (1) No, JC is worrying too much about readability; Heikki's patch is good;
>
> (2) JC's right -- "instead of calling 'git rev-list'" is much better;
>
> (3) Something else?
I think that "git foo: message" is unambiguous, and I guess _that_
could be even in one single large patch. Other cases I guess need
careful review and thinking about in a case by case basis,
unfortunately.
Better to be careful about that change than to make change and then
notice that it is not good...
--
Jakub Narebski
Poland
ShadeHawk on #git
next prev parent reply other threads:[~2008-08-31 9:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 11:12 [PATCH] Start conforming code to "git subcmd" style Heikki Orsila
2008-08-30 20:49 ` Junio C Hamano
2008-08-31 1:53 ` Christian Couder
2008-08-31 9:32 ` Jakub Narebski [this message]
2008-08-31 16:14 ` Junio C Hamano
2008-08-31 16:37 ` Heikki Orsila
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=m38wudr0mq.fsf@localhost.localdomain \
--to=jnareb@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=heikki.orsila@iki.fi \
/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).