Re: [PATCH GSoC] Allow "-" as a short-hand for "@{-1}" in branch deletions
- From
Siddharth Kannan <kannan.siddharth12@gmail.com>
- Date
- Mar 10, 2017, 03:30 UTC
- Message-ID
- <20170310033058.GA1984@instance-1.c.mfqp-source.internal>
- In-Reply-To
- <0102015ab11ee091-f9f11bb5-559a-4c92-b5f6-9f7755e8f4b9-000000@eu-west-1.amazonses.com>
Hey Shuyang, On Thu, Mar 09, 2017 at 09:47:12AM -0800, Stefan Beller wrote:
Show 8 quoted lines
> > The "-" shorthand that stands for "the branch we were previously on", > > like we did for "git merge -" sometime after we introduced "git checkout -". > > Now I am introducing this shorthand to branch delete, i.e. > > "git branch -d -". > > > > More reference: > > https://public-inbox.org/git/7vppuewl6h.fsf@alter.siamese.dyndns.org/ >
1. I have already worked on this project, and my patch is in the "Needs review" section in "What's cooking". It implements this change inside sha1_name.c and doesn't touch git branch. So, your patch is mutually exclusive to my previous patch.
2. Matthieu made an argument against enabling commands like "git branch -D -" even by mistake [1]. The way that I have implemented ensured that not a lot of "rm"-like commands were enabled.
My patch that would enable this shorthand for other projects is here[2].
[1]: http://public-inbox.org/git/vpqh944eof7.fsf@anie.imag.fr/ [2]: http://public-inbox.org/git/1488007487-12965-5-git-send-email-kannan.siddharth12@gmail.com/
Thanks, Siddharth.