Re: [PATCH] cherry-pick: allow "-" as abbreviation of '@{-1}'
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:58:19
Thomas Rast [off-list ref] writes:
Hiroshige Umino [off-list ref] writes:quoted
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.