From: Junio C Hamano Date: Mon, 05 Aug 2013 16:27:35 GMT Subject: Re: [PATCH] cherry-pick: allow "-" as abbreviation of '@{-1}' Message-ID: <7vmwowm7bc.fsf@alter.siamese.dyndns.org> In-Reply-To: <87wqo33v4f.fsf@hexa.v.cablecom.net> Thomas Rast writes: > Hiroshige Umino 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.