On Tue, 2 Dec 2014 14:42:27 +0100
Guilherme <guibuf...@gmail.com> wrote:
> In my .git/info/exclude i have the patterns:
> (...) other ignores
> (...) more ignores
> When i do
> git add -- COM/config/Project.gny
> I get no warnings or abort about the ignored path (as i expect) but
> git add -- COM/config/Project.gny COM/otherfile.c
> It outputs:
> The following paths are ignored by one of your .gitignore files:
> Use -f if you really want to add them.
> fatal: no files added
> I don't understand the difference in the behaviour. Is this intended?
To me, this appears to be a bug.
One possible reason for observable irregularity in behaviour is that the
Git code may contain a shortcut dealing with the case of a single file.
Dealing with several pathspecs at once supposedly requires first sorting
them to remove duplicates, accounting for "generality" cases like
git add somedir somedir/somefile
(where some pathspecs are essentially no-ops) and so on, hence I may
well beleive there is some sort of a shortcut which jumps right to the
actuall adding of the file is there's just a single pathspec passed.
Quite possible the "full" code path contains a bug.
Of course, my guess is quite wild and may be completely wrong, but I'm
still inclined to deem what you reported as being a bug.
In any case, to be useful, your bug report shold be rather more
* What precise version of Git are you using (run `git --version`).
* What OS it runs on?
And bugs should be reported on the main Git list which is
<git at vger.kernel.org>. It's okay to not be subscribed to that list
to post but make sure your mail program does not produce HTML-formatted
messages -- they will be rejected.  contains more pointers on this.
You received this message because you are subscribed to the Google Groups "Git
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.