Re: git add -u nonexistent-file

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Chris Packham
Date: Monday, February 8, 2010 - 12:12 pm

2010/2/8 SZEDER Gábor <szeder@ira.uka.de>:

Hi,

I see the same behaviour with git version 1.6.4.2.

From the man page of git-add

-u, --update
           Update only files that git already knows about, staging
modified content for
           commit and marking deleted files for removal.

So git will only look at files that are already in the repository.

It looks like in the case you've highlighted git is ignoring the extra
non-option parameters on the command line. I'll let other people argue
whether this is by design or omission.

'git add nonexistent-file' works as expected, exiting with an error
message and non-zero exit status.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
git add -u nonexistent-file, SZEDER =?iso-8859-1? ..., (Mon Feb 8, 11:29 am)
Re: git add -u nonexistent-file, Chris Packham, (Mon Feb 8, 12:12 pm)
Re: git add -u nonexistent-file, Jeff King, (Mon Feb 8, 5:39 pm)
Re: git add -u nonexistent-file, Chris Packham, (Tue Feb 9, 7:43 am)
[PATCH] test for add with non-existent pathspec, Chris Packham, (Tue Feb 9, 2:31 pm)
Re: git add -u nonexistent-file, Junio C Hamano, (Tue Feb 9, 2:58 pm)
Re: git add -u nonexistent-file, Chris Packham, (Tue Feb 9, 3:17 pm)
Re: git add -u nonexistent-file, Chris Packham, (Tue Feb 9, 3:30 pm)
[PATCH 1/3] test for add with non-existent pathspec, Chris Packham, (Tue Feb 9, 3:30 pm)
Re: git add -u nonexistent-file, Junio C Hamano, (Tue Feb 9, 4:18 pm)
Re: git add -u nonexistent-file, Jeff King, (Tue Feb 9, 10:57 pm)