From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Greg Brockman <gdb@mit.edu>
Cc: avarab@gmail.com, git@vger.kernel.org, gitster@pobox.com,
Jens.Lehmann@web.de, jrnieder@gmail.com
Subject: Re: [RFC/PATCH] Add test case for dealing with a tracked file in an ignored directory
Date: Thu, 19 Aug 2010 10:50:13 +0200 [thread overview]
Message-ID: <vpqr5hv56m2.fsf@bauges.imag.fr> (raw)
In-Reply-To: <AANLkTi=u2jA5MOKwyYO_pwcZaK=A1D2g+gueFGF2L+5U@mail.gmail.com> (Greg Brockman's message of "Thu\, 19 Aug 2010 02\:52\:28 -0500")
Greg Brockman <gdb@mit.edu> writes:
>> I don't think you want to complain with "did not match any files"
>> here.
> Well, I copied the behavior of 'git add "*"' here, where every file in
> . is ignored. E.g.
> """
> $ echo >ignore-file
> $ echo .gitignore >>.gitignore
> $ echo ignore-file >>.gitignore
> $ git add '*'
> fatal: pathspec '*' did not match any files
> """
OK, that makes sense (you can add comments to your tests or commit
message to justify this is case someone wonders later).
> realized today that git globbing seems to act differently depending on
> where the wildcard appears. E.g.:
> Is this a bug?
There are many known inconsistancies with Git globing, yes. See for
example:
http://thread.gmane.org/gmane.comp.version-control.git/128672/focus=128759
>> You're not testing the case
>>
>> git add ignored-dir/
>>
>> which gives another case where Git tries to add files not explicitely
>> given on the command-line. But the correct behavior of this case may
>> be more controversial, so maybe it's indeed better to focus on the
>> other cases.
> A fair point. I would have thought the behavior here should be
> unchanged, namely that 'git add ignored-dir/' should spit out a "The
> following paths are ignored by one of your .gitignore files: ..."
> error, regardless of the directory's contents. Does anyone believe
> this should be different/would it be useful for me to draw up a test
> case for it now? In any case, I'll certainly put a test case for this
> into the final patch.
It makes sense to make "git add dir/" equivalent to "git add dir/*",
but I don't really care either way.
--
Matthieu Moy
http://www-verimag.imag.fr/~moy/
next prev parent reply other threads:[~2010-08-19 8:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-11 7:03 [RFC/PATCH] git-add: Don't exclude explicitly-specified tracked files Greg Brockman
2010-08-11 12:24 ` Ævar Arnfjörð Bjarmason
2010-08-11 20:50 ` Jens Lehmann
2010-08-12 2:11 ` Greg Brockman
2010-08-11 18:22 ` Junio C Hamano
2010-08-11 18:36 ` Greg Brockman
2010-08-12 2:59 ` Junio C Hamano
2010-08-12 3:19 ` Greg Brockman
2010-08-12 8:30 ` Matthieu Moy
2010-08-12 15:54 ` Greg Brockman
2010-08-12 16:31 ` Matthieu Moy
2010-08-12 20:00 ` Junio C Hamano
2010-08-12 20:19 ` Greg Brockman
2010-08-12 20:40 ` Jonathan Nieder
2010-08-12 20:26 ` Ævar Arnfjörð Bjarmason
2010-08-18 9:07 ` Greg Brockman
2010-08-18 9:29 ` [RFC/PATCH] Add test case for dealing with a tracked file in an ignored directory Greg Brockman
2010-08-18 9:43 ` Greg Brockman
2010-08-18 9:50 ` Matthieu Moy
2010-08-19 7:52 ` Greg Brockman
2010-08-19 8:50 ` Matthieu Moy [this message]
2010-08-18 13:43 ` Ævar Arnfjörð Bjarmason
2010-08-18 13:47 ` Matthieu Moy
2010-08-18 14:02 ` Ævar Arnfjörð Bjarmason
2010-08-19 0:00 ` Jonathan Nieder
2010-08-19 0:24 ` Ævar Arnfjörð Bjarmason
2010-08-25 3:13 ` Jonathan Nieder
2010-08-29 18:27 ` Ævar Arnfjörð Bjarmason
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=vpqr5hv56m2.fsf@bauges.imag.fr \
--to=matthieu.moy@grenoble-inp.fr \
--cc=Jens.Lehmann@web.de \
--cc=avarab@gmail.com \
--cc=gdb@mit.edu \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).