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

[BUG] git-add doesn't apply filepatterns to tracked files

From
Kevin Ballard <kevin@sb.org>
Date
Dec 8, 2010, 23:01 UTC
Message-ID
<47FCD78C-5D8C-4FA5-88DC-26FDCC7361AD@sb.org>

Ran across a rather bizarre bug today while trying to help someone in #git. It seems that git-add doesn't match filepatterns against tracked files, only against untracked files. Other tested commands (such as git-rm and git-ls-files) are happy to match tracked files, but not git-add.

% git --version
git version 1.7.3.3.576.gd872
% ls -a
./       ../      .git/    bar.txt  foo.txt
% git status --short
 M foo.txt
?? bar.txt
% git add '*.txt'
% git status --short
A  bar.txt
 M foo.txt
There are no .gitignores in play here.
I haven't had time to investigate the source yet, as I'm still at work.
-Kevin Ballard
Next: Junio C Hamano
Message 1 of 3 in “[BUG] git-add doesn't apply filepatterns to tracked files”
  1. Kevin BallardDec 8, 2010
  2. Junio C HamanoDec 8, 2010
  3. Kevin BallardDec 8, 2010

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.