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

Re: checkout extra files

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 10, 2012, 00:24 UTC
Message-ID
<7vwr02pvwh.fsf@alter.siamese.dyndns.org>
In-Reply-To
<7va9x0uyz9.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 21 quoted lines
> Angelo Borsotti <angelo.borsotti@gmail.com> writes:
>
>> It makes quite clear that the command accepts wildcards
>> (not expanded by the shell), which was is not clear in the current
>> man page (although one could imagine that <path> could also be a
>> wildcard).
>>
>> P.S. In the man page there is also a <pathspec>
>>
>>     "*git checkout* [-p|--patch] [<tree-ish>] [--] <pathspec>...
>>
>> that should perhaps be a <path>
>
> That's backwards.  Saying <path> as if it means a plain vanilla
> pathname is a cause of confusion.  The command takes pathspec, which
> is a pattern (see "git help glossary"). The places in the text that
> say <path> may need to be fixed.
>
> It just happens that you do not realize that you are using pathspec
> when you say "git checkout hello.c", as the pattern "hello.c" only
> matches the one pathname "hello.c".

I've read Documentation/git-checkout.txt and looked at the use of "paths".

the most of the "paths" (if not all) in the description are used as short-hand to mean "paths that the end user specified by giving a pathspec without repeating that expression over and over again. And it should be clear from the context, especially in places where we say things like "It updates the named paths", "update the index for the given paths", "checking out paths from the index", "when paths are given" etc.

As long as readers notice that the command takes <pathspec> on the command line, and understand <pathspec> has a specific meaning (i.e. it is a way to specify set of paths to be manipulated) and semantics, the existing text should be OK. The <paths> in synopsis section should be updated to <pathspec>, though.

Previous: Junio C Hamano
Message 36 of 36 in “checkout extra files”
  1. Angelo BorsottiSep 3, 2012
  2. Carlos Martín NietoSep 3, 2012
  3. Nguyen Thai Ngoc DuySep 3, 2012
  4. Junio C HamanoSep 3, 2012
  5. Nguyen Thai Ngoc DuySep 4, 2012
  6. Junio C HamanoSep 4, 2012
  7. Angelo BorsottiSep 4, 2012
  8. Junio C HamanoSep 4, 2012
  9. Junio C HamanoSep 4, 2012
  10. Junio C HamanoSep 4, 2012
  11. Junio C HamanoSep 7, 2012
  12. Philip OakleySep 8, 2012
  13. Junio C HamanoSep 9, 2012
  14. Matthieu MoySep 9, 2012
  15. Junio C HamanoSep 9, 2012
  16. Philip OakleySep 9, 2012
  17. Jeff KingSep 10, 2012
  18. Junio C HamanoSep 10, 2012
  19. Jeff KingSep 10, 2012
  20. Junio C HamanoSep 10, 2012
  21. 1/2 gitcli: formatting fixJunio C Hamano, Sep 10, 2012
  22. 2/2 gitcli: contrast wildcard given to shell and to gitJunio C Hamano, Sep 10, 2012
  23. Jeff KingSep 10, 2012
  24. Junio C HamanoSep 10, 2012
  25. Nguyen Thai Ngoc DuySep 4, 2012
  26. Junio C HamanoSep 4, 2012
  27. Carlos Martín NietoSep 3, 2012
  28. Carlos Martín NietoSep 4, 2012
  29. Angelo BorsottiSep 4, 2012
  30. Junio C HamanoSep 4, 2012
  31. Angelo BorsottiSep 4, 2012
  32. Junio C HamanoSep 4, 2012
  33. Philip OakleySep 4, 2012
  34. Junio C HamanoSep 4, 2012
  35. Junio C HamanoSep 8, 2012
  36. Junio C HamanoSep 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.