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

Re: [Alt. PATCH] ls-remote: deprecate -h as short for --heads

From
Jeff King <peff@peff.net>
Date
Oct 20, 2017, 03:05 UTC
Message-ID
<20171020030524.4xlwrdag7e4gzg7s@sigill.intra.peff.net>
In-Reply-To
<xmqqlgk6iq94.fsf@gitster.mtv.corp.google.com>
On Fri, Oct 20, 2017 at 10:04:23AM +0900, Junio C Hamano wrote:
Show 6 quoted lines
> > Yuck. This "we only treat -h as special in certain cases" rule is
> > sufficiently magical that I don't think we want to advertise and lock
> > ourselves into it.
> 
> Hmph.  I think it is way too late to be worried about "locked into"
> the convention---hasn't the "git cmd -h" been with us forever?

I guess. I still find it pretty nasty (not that "-h" works for help, but that it can override the normal usage).

> Besides, I personally feel that there is nothing magical in the rule
> that is "we always treat 'git $cmd -h' as asking for short help, but
> individual subcommand may choose to use -h for, perhaps to be
> compatible with other tools and conventions, in other situations".

<shrug> It seems weird and inconsistent to me that the meaning of "-h" depends on the position and presence of other unrelated options. Maybe it's just me. I know _why_ it's that way, but this seems like one of those weird corners of the interface that end up confusing people and giving Git's interface the reputation of being full of mysterious inconsistencies. I suspect one of the reasons nobody has complained about it is that "ls-remote" is not commonly used, and "ls-remote -h" less so (I didn't even know it was there until this conversation).

-Peff
Previous: Junio C HamanoNext: Junio C Hamano
Message 13 of 23 in “Bug: git ls-remote -h / --head results differ in output”
  1. Thomas RiklOct 15, 2017
  2. Martin ÅgrenOct 15, 2017
  3. René ScharfeOct 15, 2017
  4. 1/2 git: add NO_INTERNAL_HELP flag for builtinsRené Scharfe, Oct 17, 2017
  5. Jonathan NiederOct 17, 2017
  6. ls-remote: deprecate -h as short for --headsRené Scharfe, Oct 17, 2017
  7. Martin ÅgrenOct 17, 2017
  8. Jonathan NiederOct 17, 2017
  9. Junio C HamanoOct 17, 2017
  10. René ScharfeOct 19, 2017
  11. Jeff KingOct 19, 2017
  12. Junio C HamanoOct 20, 2017
  13. Jeff KingOct 20, 2017
  14. Junio C HamanoOct 20, 2017
  15. Jeff KingOct 21, 2017
  16. René ScharfeOct 21, 2017
  17. Junio C HamanoOct 21, 2017
  18. René ScharfeOct 23, 2017
  19. Junio C HamanoOct 24, 2017
  20. René ScharfeOct 24, 2017
  21. 2/2 ls-remote: use PARSE_OPT_NO_INTERNAL_HELPRené Scharfe, Oct 17, 2017
  22. Jonathan NiederOct 17, 2017
  23. Martin ÅgrenOct 17, 2017

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.