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

Re: [RFC] Delete current branch

From
Taylor Hedberg <tmhedberg@gmail.com>
Date
Jul 19, 2013, 17:08 UTC
Message-ID
<20130719170830.GD5999@euporie>
In-Reply-To
<7vppuewl6h.fsf@alter.siamese.dyndns.org>
Junio C Hamano, Fri 2013-07-19 @ 09:48:06-0700:
Show 5 quoted lines
> But there is a very commonly accepted long tradition for "-" to mean
> "read from the standard input", so we cannot reuse it to mean "the
> branch I was previously on" for every command without first making
> sure the command will never want to use "-" for the other common
> purpose.

It may be worth noting that Bash (and probably other shells as well) allow you to type `cd -` to switch back to the previous working directory. I always (apparently mistakenly) assumed that `git checkout -` was deliberately designed to mirror that shortcut. I think the symmetry gives it some credibility, in any case. This alternative meaning for - is not totally without precedent.

What would it mean to check out the standard input, anyway? I cannot see how that could ever make sense, unless `git checkout` gains some additional capaabilities that are unrelated to its current purpose. Maybe I am just being myopic, though.

Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 8 of 10 in “[RFC] Delete current branch”
  1. Ramkumar RamachandraJul 19, 2013
  2. Andreas SchwabJul 19, 2013
  3. Ramkumar RamachandraJul 19, 2013
  4. Junio C HamanoJul 19, 2013
  5. Ramkumar RamachandraJul 19, 2013
  6. Junio C HamanoJul 19, 2013
  7. Ramkumar RamachandraJul 19, 2013
  8. Taylor HedbergJul 19, 2013
  9. Junio C HamanoJul 19, 2013
  10. Junio C HamanoJul 19, 2013

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.