From: Chris Packham <judge.packham@gmail.com>
To: "SZEDER Gábor" <szeder@ira.uka.de>
Cc: git@vger.kernel.org
Subject: Re: git add -u nonexistent-file
Date: Mon, 8 Feb 2010 14:12:41 -0500 [thread overview]
Message-ID: <a038bef51002081112s2d552835m4b34973f797ab4f8@mail.gmail.com> (raw)
In-Reply-To: <20100208182929.GB14355@neumann>
2010/2/8 SZEDER Gábor <szeder@ira.uka.de>:
> Hi,
>
>
> $ git --version
> git version 1.7.0.rc1.84.g9879
> $ git add -u nonexistent-file
> $ echo $?
> 0
>
> No error message, no error in exit status.
>
> Is it OK this way? Why?
>
>
> Best,
> Gábor
>
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.
next prev parent reply other threads:[~2010-02-08 19:20 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 18:29 git add -u nonexistent-file SZEDER Gábor
2010-02-08 19:12 ` Chris Packham [this message]
2010-02-09 0:39 ` Jeff King
2010-02-09 14:43 ` Chris Packham
2010-02-09 21:31 ` [PATCH] test for add with non-existent pathspec Chris Packham
2010-02-09 21:58 ` git add -u nonexistent-file Junio C Hamano
2010-02-09 22:17 ` Chris Packham
2010-02-09 22:30 ` Chris Packham
2010-02-09 22:30 ` [PATCH 1/3] test for add with non-existent pathspec Chris Packham
2010-02-09 22:30 ` [PATCH 2/3] git add -u: give an error if pathspec unmatched Chris Packham
2010-02-09 22:30 ` [PATCH 3/3] t2200-add-update.sh: change expected fail to success Chris Packham
2010-02-09 23:18 ` git add -u nonexistent-file Junio C Hamano
2010-02-10 5:57 ` Jeff King
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=a038bef51002081112s2d552835m4b34973f797ab4f8@mail.gmail.com \
--to=judge.packham@gmail.com \
--cc=git@vger.kernel.org \
--cc=szeder@ira.uka.de \
/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.
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).