git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] branch: add '-' to delete previous branch

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 29, 2020, 20:35 UTC
Message-ID
<20200429203508.GA7899@syl.local>
In-Reply-To
<xmqqa72uvy7n.fsf@gitster.c.googlers.com>
On Wed, Apr 29, 2020 at 01:22:36PM -0700, Junio C Hamano wrote:
Show 14 quoted lines
> Taylor Blau <me@ttaylorr.com> writes:
>
> > Again, not sure that this is always the case. This *is* how 'git
> > checkout' works.
>
> To be honest, I am somewhat sympathetic to those who find "-" ==
> "@{-1}" unless it is used as an argument to "git checkout/switch".
> The use of "-" in "checkout" is the exception, not the norm, and it
> was sort of justifiable due to similarity to "cd -".  Both are
> commands to the computer you give to "go to the previous place".
>
> "git merge -", "git branch -d -" etc. are not about *going* to the
> previous place, and declaring the "-" is "previous place" is taking
> it a bit too far, at least to my taste.

OK, I could sympathize with that as well. I still think that my suggestion from earlier about documenting the fact that 'git branch -D' already understands '@{-N}' as a separate first patch is valid.

If I were the author, I'd cut that as a first patch, and discard the remainder if it sounds like we don't want to go with 'git branch -D -', which is fine by me. (I don't really care either way, and I can understand the arguments in both directions).

Show 5 quoted lines
> Oh, I do not like those who advocate "@" as a synonym for "HEAD",
> either.  If there is one simple thing I want to get rid of from the
> system, that's it ;-).
>
> Anyway...

Thanks, Taylor

Previous: Junio C HamanoNext: Junio C Hamano
Message 8 of 25 in “branch: add '-' to delete previous branch”
  1. branch: add '-' to delete previous branchIvan Tham, Apr 29, 2020
  2. Sergey OrganovApr 29, 2020
  3. Taylor BlauApr 29, 2020
  4. Eric SunshineApr 29, 2020
  5. Sergey OrganovApr 29, 2020
  6. Taylor BlauApr 29, 2020
  7. Junio C HamanoApr 29, 2020
  8. Taylor BlauApr 29, 2020
  9. Junio C HamanoApr 29, 2020
  10. Junio C HamanoApr 29, 2020
  11. Sergey OrganovApr 29, 2020
  12. Konstantin KhomoutovApr 30, 2020
  13. Junio C HamanoApr 30, 2020
  14. Sergey OrganovMay 1, 2020
  15. Konstantin KhomoutovMay 1, 2020
  16. Sergey OrganovMay 1, 2020
  17. Taylor BlauMay 1, 2020
  18. Ivan ThamApr 30, 2020
  19. Junio C HamanoApr 29, 2020
  20. Randall S. BeckerApr 29, 2020
  21. Sergey OrganovApr 29, 2020
  22. Taylor BlauApr 29, 2020
  23. Ivan ThamApr 30, 2020
  24. Taylor BlauApr 30, 2020
  25. Junio C HamanoApr 30, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.