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

Re: checkout extra files

From
Philip Oakley <philipoakley@iee.org>
Date
Sep 4, 2012, 22:53 UTC
Message-ID
<53AE674D81CD4B9CB013C1DE846240B2@PhilipOakley>
In-Reply-To
<7vobll8qn2.fsf@alter.siamese.dyndns.org>
From: "Junio C Hamano" <gitster@pobox.com>
Sent: Tuesday, September 04, 2012 9:44 PM
Show 32 quoted lines
> Angelo Borsotti <angelo.borsotti@gmail.com> writes:
>
>> The issue here is that the paths must denote filenames that are
>> present in the index
>> or tree-ish, so, wildcards are misleading since they would instead be
>> interpreted
>> with respect to the working directory.
>
> When you are talking to a shell (and you almost never directly talk
> to Git), wildcards are always interpreted with respect to the
> working directory by the shell.  And that is not specific to Git.
>
>> A possible way to make this clear is to warn the user to quote paths
>> that contain
>> wildcards. Something like, e.g.:
>>
>>   "Note that <paths> that contain wildcards must be quoted in order 
>> to
>> denote files that
>>    belong to the index or <tree-ish>. Otherwise, they are interpreted
>> by the shell with
>>    respect to the current directory, with a result that may depend on
>> the shell."
>
> Perhaps, if you drop ", with a result..." from that sentence.
>
> Even though that description is a bit too much on the side of "shell
> primer" than "git documentation" for my taste, I could see it may
> help some people, so I wouldn't reject such a phrasing out of hand.
>
> Let's see what others feel.
>

A comment about the need to quote wild cards would certainly be of advantage to many Windows users who won't have used a shell in that way before.

Plus I suspect that a large fraction of basic unix/linux users will have never really considered the difference between shell expansion and git expansion in this case where there are two diifferent 'file systems', as demonstrated by the initial query.

Previous: Junio C HamanoNext: Junio C Hamano
Message 33 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.