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

Re: git checkout error

From
ABAngelo Borsotti <angelo.borsotti@gmail.com>
Date
Oct 10, 2012, 07:02 UTC
Message-ID
<CAB9Jk9AFnauxX0dk8LfpBkpGDSWpWhqnzVew1Eo51K+qEA680A@mail.gmail.com>
In-Reply-To
<7v626jdx8f.fsf@alter.siamese.dyndns.org>
Junio,

giving the user a better error message is certainly an improvement. But would not be another improvement to describe better the command syntax so as to help the user write the command right in the first place? After all, what is the syntax section in commands for? If I had seen in the syntax:

     git checkout [-q] [-f] [-m] [ [--track|--no-track](-b|-B)
<new_branch>] [<start_point>]

I would have written the command correctly, and not even stumbled on a misleading error message. Note that the above syntax is exactly what the command must look like. The syntax is mostly a description of the form of command for the user. Internally, the implementer can use it or can even use a different one (e.g. a more lenient one and detect errors at the semantic level instead). But here what matters is not how the command is implemented, but how the user has to form it. Why it is so difficult to convince people to make documentation better?

-Angelo
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 8 in “git checkout error”
  1. Angelo BorsottiOct 9, 2012
  2. Andreas SchwabOct 9, 2012
  3. Junio C HamanoOct 9, 2012
  4. Angelo BorsottiOct 9, 2012
  5. Junio C HamanoOct 9, 2012
  6. Angelo BorsottiOct 10, 2012
  7. Junio C HamanoOct 10, 2012
  8. Angelo BorsottiOct 10, 2012

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.