From: Miles Bader <miles@gnu•org>
To: Sverre Rabbelier <srabbelier@gmail•com>
Cc: Matthieu Moy <Matthieu.Moy@imag•fr>, git@vger•kernel.org
Subject: Re: [RFC PATCH 1/2] Allow "git log --grep foo" as synonym for "git log --grep=foo".
Date: Tue, 27 Jul 2010 17:40:50 +0900 [thread overview]
Message-ID: <buohbjll3l9.fsf@dhlpc061.dev.necel.com> (raw)
In-Reply-To: <AANLkTikGPMDvxQKjpKOBge8UwrC_GuC36_=C_tYR_ngr@mail.gmail.com> (Sverre Rabbelier's message of "Tue, 27 Jul 2010 01:43:22 -0500")
Sverre Rabbelier <srabbelier@gmail•com> writes:
>> + } else if (!strcmp(arg, "--grep")) {
>> + add_message_grep(revs, optarg);
>> + return 2;
>
> This one makes a little less sense since to me '--flag' are always
> booleans, whereas '-m' can take an argument (such as '-m' from 'git
> commit'.
The fact that --grep requires the "=" is amazingly confusing if you're
used to standard GNU long-argument parsing (which many standard
utilities use, and which git's argument syntax is clearly modelled
after), where both forms are equivalent, and documentation typically
only refers to the "=" form, but implicitly allows the separate-args
form.
I'm continually getting tripped up by git's idiosynchratic argument
parsing, and it's nice to see it getting cleaned up a bit...
-Miles
--
The trouble with most people is that they think with their hopes or
fears or wishes rather than with their minds. -- Will Durant
next prev parent reply other threads:[~2010-07-27 8:41 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-26 18:14 [RFC PATCH 0/2] Allow detached forms (--option arg) for git log options Matthieu Moy
2010-07-26 18:14 ` [RFC PATCH 1/2] Allow "git log --grep foo" as synonym for "git log --grep=foo" Matthieu Moy
2010-07-27 6:43 ` Sverre Rabbelier
2010-07-27 8:40 ` Miles Bader [this message]
2010-07-27 10:24 ` Jakub Narebski
2010-07-27 8:45 ` Matthieu Moy
2010-07-27 10:18 ` Ævar Arnfjörð Bjarmason
2010-07-27 11:56 ` Matthieu Moy
2010-07-27 12:21 ` Ævar Arnfjörð Bjarmason
2010-07-27 13:26 ` Matthieu Moy
2010-07-27 13:46 ` Ævar Arnfjörð Bjarmason
2010-07-26 18:14 ` [RFC PATCH 2/2] Allow "git log -S string" as synonym for "git log -Sstring" Matthieu Moy
2010-07-27 6:42 ` Sverre Rabbelier
2010-07-26 19:31 ` [RFC PATCH 0/2] Allow detached forms (--option arg) for git log options Jonathan Nieder
2010-07-27 14:46 ` Pierre Habouzit
2010-07-27 15:10 ` Jakub Narebski
2010-07-28 13:06 ` Pierre Habouzit
2010-07-29 9:16 ` Jakub Narebski
2010-07-29 18:33 ` Pierre Habouzit
2010-08-01 5:24 ` Jonathan Nieder
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=buohbjll3l9.fsf@dhlpc061.dev.necel.com \
--to=miles@gnu$(echo .)org \
--cc=Matthieu.Moy@imag$(echo .)fr \
--cc=git@vger$(echo .)kernel.org \
--cc=srabbelier@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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