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

Re: Improving the git remote command

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 26, 2014, 17:24 UTC
Message-ID
<xmqq7g1vjh9o.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20140826163741.GA14983@peff.net>
Jeff King <peff@peff.net> writes:
Show 15 quoted lines
> ... But we are left with three options:
>
>   1. Add "git remote list" with verbose output. This is bad because it
>      differs gratuitously from "git remote".
>
>   2. Add "git remote list" with non-verbose output. This is good because
>      it means "git remote" is just a shortcut for "git remote list",
>      which is consistent with other parts of git. But it is potentially
>      bad if "-v" is a better output format.
>
>   3. Add "git remote list" with verbose output, and tweak "git remote"
>      to match. This is bad because it breaks backwards compatibility.
>
> The proposal is for (1). I think we agree that (3) is out. The question
> is whether (1) or (2) is the least bad.

I would imagine that those who want list of remotes programatically would read from "git config" output and it would be with less friction to change the output from "git remote", a command that is solely to cater to end-user humans, to suit people's needs, so I am not sure if (3) is immediately "out".

Having said that, my preference is 
    0. Do nothing, but document the "default to listing" better if
       needed.
and then 2. above, and then 1.
Show 9 quoted lines
> Yeah. Branch and tag need dashed subcommands because otherwise it is
> ambiguous with creating tag called "list", functionality that existed
> before "--list" was added. Git-remote was defined with subcommands from
> day one, so it can get away with it. Git-stash is sort of in the
> category as git-remote there, except that "save" can actually take an
> argument. So to provide it you can't say "git stash foobar", but instead
> have to say "git stash save foobar" (it actually used to allow the
> former, but you can imagine the annoyance when you typo "git stash
> lsit").
Yeah, and there also is this one:
  http://thread.gmane.org/gmane.comp.version-control.git/231376/focus=231478
Previous: Jeff KingNext: Jeff King
Message 6 of 10 in “Improving the git remote command”
  1. Rémy HubscherAug 26, 2014
  2. Philippe VaucherAug 26, 2014
  3. Jeff KingAug 26, 2014
  4. Philippe VaucherAug 26, 2014
  5. Jeff KingAug 26, 2014
  6. Junio C HamanoAug 26, 2014
  7. Jeff KingAug 26, 2014
  8. David AguilarAug 27, 2014
  9. Junio C HamanoAug 27, 2014
  10. Keller, Jacob EAug 27, 2014

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.