From: Junio C Hamano <gitster@pobox.com>
To: Thomas Rast <trast@inf.ethz.ch>
Cc: Hiroshige Umino <hiroshige88@gmail.com>, <git@vger.kernel.org>
Subject: Re: [PATCH] cherry-pick: allow "-" as abbreviation of '@{-1}'
Date: Mon, 05 Aug 2013 09:27:35 -0700 [thread overview]
Message-ID: <7vmwowm7bc.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <87wqo33v4f.fsf@hexa.v.cablecom.net> (Thomas Rast's message of "Sat, 3 Aug 2013 12:51:28 +0200")
Thomas Rast <trast@inf.ethz.ch> writes:
> Hiroshige Umino <hiroshige88@gmail.com> writes:
>
>> As "git cherry-pick -" or "git merge -" is convenient to
>> switch back to or merge the previous branch,
>> "git cherry-pick -" is abbreviation of "git cherry-pick @{-1}"
>> to pick up a commit from the previous branch conveniently.
>
> The first line is confusing. Did you mean to invoke the existing 'git
> *checkout* -' and 'git merge -' functionality as a reason why 'git
> cherry-pick -' should exist?
I think that is what was meant. Just like "-" abbreviation is handy
for users of "checkout" and "merge", "cherry-pick" might. I am not
sure if you would often cherry-pick from the previous branch, but
for the sake of completeness and uniformity, the guiding principle
could be "at any point on the command line where a branch name is
accepted, if a '-' could not possibly mean any other thing is wanted
(e.g. doing something on the standard input), it should stand as the
name of the previous branch".
I agree with everything you said in your review. The patch is going
in the right direction, but it needs a bit more work.
Thanks.
next prev parent reply other threads:[~2013-08-05 16:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-03 5:15 [PATCH] cherry-pick: allow "-" as abbreviation of '@{-1}' Hiroshige Umino
2013-08-03 10:51 ` Thomas Rast
2013-08-05 16:27 ` Junio C Hamano [this message]
2013-08-16 15:17 ` Hiroshige Umino
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vmwowm7bc.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=hiroshige88@gmail.com \
--cc=trast@inf.ethz.ch \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).