From: Matthieu Moy <Matthieu.Moy@grenoble-inp•fr>
To: git <git@vger•kernel.org>
Subject: Behavior of 'git add \*.txt': bug or feature?
Date: Wed, 16 Sep 2009 21:46:51 +0200 [thread overview]
Message-ID: <vpqljke7jv8.fsf@bauges.imag.fr> (raw)
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/
next reply other threads:[~2009-09-16 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-16 19:46 Matthieu Moy [this message]
2009-09-16 20:30 ` Behavior of 'git add \*.txt': bug or feature? Junio C Hamano
2009-09-16 21:26 ` Matthieu Moy
2009-09-17 14:25 ` Clemens Buchacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqljke7jv8.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp$(echo .)fr \
--cc=git@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox