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

Re: update-cache ./test.c

From
David Greaves <david@dgreaves.com>
Date
May 1, 2005, 09:43 UTC
Message-ID
<4274A4C6.3000400@dgreaves.com>
In-Reply-To
<20050501084145.GA30692@xi.wantstofly.org>
Lennert Buytenhek wrote:
Show 15 quoted lines
>Hi,
>
>update-cache seems to ignore paths containing path components
>starting with a dot:
>
>	pi% update-cache --add ./test.c
>	Ignoring path ./test.c
>	pi% update-cache --add test.c
>	pi%
>
>This is slightly annoying as 'find -type f | xargs update-cache --add'
>doesn't work because of this.  ('find * -type f | ...` does.)  Instead
>of ignoring the file, can we just strip off the leading "./"
>  
>
This is documented behaviour:
<file>
    Files to act on.
    Note that files begining with '.' are discarded. This includes
    "./file" and "dir/./file". If you don't want this, then use   
    cleaner names.
    The same applies to directories ending '/' and paths with '//'
"Where?" you ask...

Well, Linus hasn't accepted the docs for some reason - you have to search the archives...

Sorry about that...

David PS Changing this behaviour was discussed and dismissed for the core tools. If the problem appears in Cogito however, then it's worth patching...

Previous: Junio C Hamano
Message 7 of 7 in “update-cache ./test.c”
  1. Lennert BuytenhekMay 1, 2005
  2. Thomas GlanzmannMay 1, 2005
  3. Lennert BuytenhekMay 1, 2005
  4. Lennert BuytenhekMay 1, 2005
  5. Thomas GlanzmannMay 1, 2005
  6. Junio C HamanoMay 1, 2005
  7. David GreavesMay 1, 2005

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.