Subject: Re: [PATCH v2] allow "-" as short-hand for "@{-1}" in "branch -d"

From: Rubén Justo <[email-masked]>
Date: Tue, 16 Aug 2022 23:27:12 +0200

On 8/16/22 8:55 PM, Junio C Hamano wrote:
> 
>> From: rjusto <[email-masked]>
> 
> Documentation/SubmittingPatches:
> 
>      Also notice that a real name is used in the `Signed-off-by`
>      trailer. Please don't hide your real name.
> 

Fixed.

>>       -    branch: allow "-" as a short-hand for "previous branch"
>>       +    allow "-" as short-hand for "@{-1}" in "branch -d"
> 
> The "branch:" prefix is lost here, which is not an improvement.  The
> "<area>:" prefix is what makes it easier to locate a particular
> change in "git shortlog --no-merges v2.37.0..v2.38.0".

Just want to reduce the confusion, as Johannes suggested, that could 
apply to the whole command. But ok, I've put it back.

> 
> As to the implementation, there is nothing to complain about, but as
> we already discussed during the reivew of the first iteration, I am
> not sure if the goal is sound in the first place.
> 

Sorry, I don't want to be annoying, I just think the effort is worth of it.

The change rounds the workflow: "checkout/merge/branch -d" and does not 
introduce any new confusion or new circumstance. The commands that 
already support the substitution doesn't support it in all combinations, 
complex use cases can (probably, should) use the @{-1} syntax and 
definitely those uses are not the candidates to use the short-hands.

> Thanks.

Thank you.

Rubén.