From: Rubén Justo Date: Tue, 16 Aug 2022 21:27:12 GMT Subject: Re: [PATCH v2] allow "-" as short-hand for "@{-1}" in "branch -d" Message-ID: <4707eba3-bcfa-24ef-ca6d-a23d6a64ee6d@gmail.com> In-Reply-To: On 8/16/22 8:55 PM, Junio C Hamano wrote: > >> From: rjusto > > 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 > ":" 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.