Re: [PATCH] cherry-pick: allow "-" as abbreviation of '@{-1}'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thomas Rast <trast@xxxxxxxxxxx> writes:

> Hiroshige Umino <hiroshige88@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]