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

Resubmit after a night of sleep

From
Pierre Habouzit <madcoder@debian.org>
Date
Jul 23, 2008, 10:15 UTC
Message-ID
<1216808133-31919-1-git-send-email-madcoder@debian.org>
In-Reply-To
<1216774940-4955-1-git-send-email-madcoder@debian.org>

Okay, so after a (too short) night sleep, here is a way better series. The first patch corrects a real bug, and should be applied to maint. It's a one liner, the comment is self explanatory.

The second one is a twofold UI improvement wrt error messages that git-checkout (if we abstract the issues from patch 1) already caught as errors but with dreadful errors. And with respect to the case where there is no '--' and that there is an ambiguity. We used to always favor the interpretation where the first argument is understood as a path (which is really horrible because it's the destructive choice: at least if we favored the reference, user would never loose local modifications), it now barfs.

I reckon I've not checked what git-checkout did when it wasn't a builtin, so I don't know if the second part of this UI improvement comes as fixing a regression (in which case the patch could be considered for maint) or if it's an ambiguity that was here like forever, in which case it's less urgent, but should IMHO be addressed because git-checkout is porcelain: see http://gist.github.com/1402 for the user issue that made me discover that, you'll see we want a desambiguation one way or the other.

Previous: Johannes SchindelinNext: Pierre Habouzit
Message 8 of 16 in “git-checkout: fix argument parsing to detect ambiguous arguments.”
  1. git-checkout: fix argument parsing to detect ambiguous arguments.Pierre Habouzit, Jul 23, 2008
  2. Pierre HabouzitJul 23, 2008
  3. Johannes SchindelinJul 23, 2008
  4. Pierre HabouzitJul 23, 2008
  5. git-checkout: fix argument parsing to detect ambiguous arguments.Pierre Habouzit, Jul 23, 2008
  6. Pierre HabouzitJul 23, 2008
  7. Johannes SchindelinJul 23, 2008
  8. Resubmit after a night of sleepPierre Habouzit, Jul 23, 2008
  9. 1/2 git-checkout: fix command line parsing.Pierre Habouzit, Jul 23, 2008
  10. 2/2 git-checkout: improve error messages, detect ambiguities.Pierre Habouzit, Jul 23, 2008
  11. Junio C HamanoJul 23, 2008
  12. Junio C HamanoJul 24, 2008
  13. Pierre HabouzitJul 24, 2008
  14. checkout: mention '--' in the docsSZEDER Gábor, Jul 23, 2008
  15. bash: offer only paths after '--' for 'git checkout'SZEDER Gábor, Jul 23, 2008
  16. Shawn O. PearceJul 25, 2008

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.