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

Re: [PATCH 0/3] preparatory patches for the submodule groups

From
Junio C Hamano <gitster@pobox.com>
Date
May 3, 2016, 22:24 UTC
Message-ID
<xmqq7ffalqza.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<CAGZ79kZK_EtwBps3hcYVkRat2XbpXXXdXkQDrB281rxkedjaGA@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 5 quoted lines
>> I wouldn't be surprised if many people wished that "git branch" did
>> not list (and required "git branch -l" to list) to scroll everything
>> they are looking away but instead showed what the current branch is.
>
> Isn't that yet another more specialized mode of operation?

Yes. It all boils down to "what is the most common thing people would want" and "which one of these operation modes deserve the short-hand".

Most often, the first one that gets invented ends up squatting on the short-and-sweet "by default without parameter, we do this" slot, and we have to let it squat forever due to backward compatibility.

I think "git branch" that shows all 300 branches is a good example of that--if we didn't have command line prompt support, I am reasonably sure that "git branch --current-branch" would have been added by popular request long time ago, and that would be a more common thing people would want than "git branch -l". I would not be surprised if in an alternative universe in which both "list" and "tell me current" were available back when the "no option default" had not been defined yet, we gave the shortest-and-sweetest to "git branch ---current-branch".

Previous: Stefan Beller
Message 17 of 17 in “preparatory patches for the submodule groups”
  1. 0/3 preparatory patches for the submodule groupsStefan Beller, May 2, 2016
  2. 1/3 submodule deinit test: fix broken && chain in subshellStefan Beller, May 2, 2016
  3. Junio C HamanoMay 3, 2016
  4. Stefan BellerMay 3, 2016
  5. 2/3 submodule deinit: lose requirement for giving '.'Stefan Beller, May 2, 2016
  6. Junio C HamanoMay 3, 2016
  7. Stefan BellerMay 3, 2016
  8. Junio C HamanoMay 3, 2016
  9. Stefan BellerMay 3, 2016
  10. 3/3 submodule init: redirect stdout to stderrStefan Beller, May 2, 2016
  11. Junio C HamanoMay 3, 2016
  12. Stefan BellerMay 3, 2016
  13. Junio C HamanoMay 3, 2016
  14. Stefan BellerMay 3, 2016
  15. Junio C HamanoMay 3, 2016
  16. Stefan BellerMay 3, 2016
  17. Junio C HamanoMay 3, 2016

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.