git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Behavior of 'git add \*.txt': bug or feature?
@ 2009-09-16 19:46 Matthieu Moy
  2009-09-16 20:30 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Matthieu Moy @ 2009-09-16 19:46 UTC (permalink / raw)
  To: git

Hi,

I find the behavior of 'git add \*.txt' strange: for adding untracked
files, it considers \*.txt as a pattern to match, but for updating
existing file's staged content, it seems to consider it as a filename:

$ git status
# On branch master
# Changed but not updated:
#
#       modified:   three.txt
#       modified:   two.txt
#
# Untracked files:
#
#       one.txt
no changes added to commit (use "git add" and/or "git commit -a")
$ git add -v '*.txt'
add 'one.txt'
$ git add -v '*.txt'
$ 

I would have expected this "git add -v '*.txt'" to update the staged
content of two.txt and three.txt too.

It this the intended behavior? If so, what's the rationale for this?

Thanks,

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-09-17 14:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-16 19:46 Behavior of 'git add \*.txt': bug or feature? Matthieu Moy
2009-09-16 20:30 ` Junio C Hamano
2009-09-16 21:26   ` Matthieu Moy
2009-09-17 14:25   ` Clemens Buchacher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).