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

Re: [RFC] Making ce_path_match() more useful by accepting globs

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 26, 2007, 00:48 UTC
Message-ID
<7vhcj9j0hj.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<7vlk8lj1b7.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 22 quoted lines
> Alex Riesen <raa.lkml@gmail.com> writes:
>
>> Junio C Hamano, Sun, Nov 25, 2007 19:03:12 +0100:
>>> Currently ce_path_match() only uses "the leading directory" match, and
>>> does not understand file globs.  These do not work:
>>> 
>>>    git diff-files 't/*.sh'
>>>    git diff-index HEAD 'xdiff/*.c'
>>>    git update-index -g 'Documentation/howto/*.txt'
>>
>> How should my scripts handle files with "*" in names?
> ...
> Having said that, I would think that quoting the meta from fnmatch(3)
> like this:
>
> 	git ls-files 'such-\*-a-file'
>
> would work fine, just like
>
> 	ls such-\*-a-file
>
> would.
Yup.  I just did:
	$ >M\*kefile
        $ git add 'M\*kefile'
        $ git ls-files 'M\*kefile'
        M*kefile
        $ git ls-files 'M*kefile'
        M*kefile
        Makefile
Previous: Junio C HamanoNext: Alex Riesen
Message 4 of 5 in “[RFC] Making ce_path_match() more useful by accepting globs”
  1. Junio C HamanoNov 25, 2007
  2. Alex RiesenNov 26, 2007
  3. Junio C HamanoNov 26, 2007
  4. Junio C HamanoNov 26, 2007
  5. Alex RiesenNov 26, 2007

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.