git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Allow detached forms (--option arg) for git log options.
@ 2010-07-26 18:14 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
                   ` (2 more replies)
  0 siblings, 3 replies; 20+ messages in thread
From: Matthieu Moy @ 2010-07-26 18:14 UTC (permalink / raw)
  To: git; +Cc: Matthieu Moy

Hi,

This has been bothering me for a while: many commands accept detached
form (like "git commit -m message" instead of "git commit -mmessage"),
but others don't, in particular, git log options like

git log -S<string>
git log --grep=<string>

do not accept spaces.

This small patch serie is a very early RFC: it implements the feature
for just two options. There are at least 4 ways towards a real
implementations:

1) nobody except me likes the feature, drop the RFC.

2) Implement the same for other options. That's very repetitive (for
   each option, there are two ifs: a prefixcmp and a strcmp), I don't
   like it much.

3) Write a function or macro that accepts both variants, and use it
   everywhere.

4) use parse-option for "git log" options and then get the feature for
   free.

Hence my question: is there any reason why "git log" hasn't been
migrated to parse-option? Or is it only that nobody did it yet?

What do you think?

Thanks,

Matthieu Moy (2):
  Allow "git log --grep foo" as synonym for "git log --grep=foo".
  Allow "git log -S string" as synonym for "git log -Sstring".

 diff.c     |    5 +++++
 revision.c |    4 ++++
 2 files changed, 9 insertions(+), 0 deletions(-)

-- 
1.7.2.23.g58c3b.dirty

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2010-08-01  5:25 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).