From: Jonas Fonseca <fonseca@diku.dk>
To: Junio C Hamano <junkio@cox.net>
Cc: Alex Riesen <raa.lkml@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] revert/cherry-pick: allow the last parameter to be -h
Date: Wed, 23 May 2007 08:57:50 +0200 [thread overview]
Message-ID: <20070523065750.GA25931@diku.dk> (raw)
In-Reply-To: <7v8xbg5bno.fsf@assigned-by-dhcp.cox.net>
Junio C Hamano <junkio@cox.net> wrote Tue, May 22, 2007:
> Jonas Fonseca <fonseca@diku.dk> writes:
>
> > Junio C Hamano <junkio@cox.net> wrote Tue, May 22, 2007:
> >> Alex Riesen <raa.lkml@gmail.com> writes:
> >> ...
> >> > Why should cherry-pick be different?
> >>
> >> Good question. FYI
> >>
> >> $ git rev-list --huh?
> >>
> >> works equally well ;-)
> >
> > Because it is different?
> >
> > $ git revert --why-must-it-be-so-hard-to-learn-git-sometimes
> > fatal: Cannot find '--why-must-it-be-so-hard-to-learn-git-sometimes'
> >
> > Because, contrary to git-rev-list, git-revert/cherry-pick is considered
> > part of the porcelain?
>
> No, I did not notice it until now but you are right. The
> command line argument parser for these commands is done somewhat
> sloppily, compared to others.
>
> How about doing something like this instead?
FWIW, I like it. Sorry for my quick and dirty patch.
> -- >8 --
> Fix command line parameter parser of revert/cherry-pick
>
> The parser was inconsistently done, [...]in that it did not look at
> the last command line parameter to see if it could be an unknown
> option, although it was designed to notice unknown options if
> they were given in positions the command expects to find them
> (i.e. everything except the last parameter, which ought to be
> <commit-ish>). This prevented a very natural invocation
>
> $ git cherry-pick --help
>
> from issuing the usage help.
But --help is handled elsewhere, you meant -h ...
--
Jonas Fonseca
next prev parent reply other threads:[~2007-05-23 6:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-22 21:29 [PATCH] revert/cherry-pick: allow the last parameter to be -h Jonas Fonseca
2007-05-22 22:11 ` Alex Riesen
2007-05-22 22:23 ` Junio C Hamano
2007-05-23 5:31 ` Jonas Fonseca
2007-05-23 5:52 ` Junio C Hamano
2007-05-23 6:57 ` Jonas Fonseca [this message]
2007-05-23 7:04 ` Junio C Hamano
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=20070523065750.GA25931@diku.dk \
--to=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=junkio@cox.net \
--cc=raa.lkml@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