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

Re: [PATCH v2] gitcli: tweak "man gitcli" for clarity

From
Jeff King <peff@peff.net>
Date
Nov 24, 2017, 18:16 UTC
Message-ID
<20171124181639.GD29190@sigill>
In-Reply-To
<xmqq7eugqykq.fsf@gitster.mtv.corp.google.com>
On Fri, Nov 24, 2017 at 10:01:41AM +0900, Junio C Hamano wrote:
Show 6 quoted lines
> Actually the second example is a lot worse (and that is why I am
> bringing it up).  If git does spend cycles to realize that "git
> could", for consistency, it must also check if "next" is unambiguous
> between a path or a rev, i.e. it must dig history from "master" and
> see if "next" appears as a path ever in the history, and if so, die
> with "ambiguous argument".

I just sent a similar response before reading this, and agree with everything you said.

But I wanted to point out this "we must also look for ambiguities" argument, because I totally missed it in my response. And it's much more damning, I think, because it means you can never short-cut the easy cases and say "OK, we found the path, therefore we can stop our traversal early". To behave consistently, you have to always do the whole traversal twice.

-Peff
Previous: Junio C HamanoNext: Jeff King
Message 17 of 19 in “gitcli: tweak "man gitcli" for clarity”
  1. gitcli: tweak "man gitcli" for clarityRobert P. J. Day, Nov 21, 2017
  2. Kevin DaudtNov 21, 2017
  3. Robert P. J. DayNov 21, 2017
  4. Kevin DaudtNov 21, 2017
  5. Robert P. J. DayNov 21, 2017
  6. Robert P. J. DayNov 22, 2017
  7. Junio C HamanoNov 22, 2017
  8. Robert P. J. DayNov 22, 2017
  9. Kevin DaudtNov 22, 2017
  10. Robert P. J. DayNov 22, 2017
  11. Jeff KingNov 23, 2017
  12. Junio C HamanoNov 23, 2017
  13. Robert P. J. DayNov 23, 2017
  14. Jeff KingNov 23, 2017
  15. Kevin DaudtNov 23, 2017
  16. Junio C HamanoNov 24, 2017
  17. Jeff KingNov 24, 2017
  18. Jeff KingNov 24, 2017
  19. Junio C HamanoNov 25, 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.