From: Junio C Hamano <gitster@pobox•com>
To: Jeff King <peff@peff•net>
Cc: Jon Forrest <nobozo@gmail•com>, git@vger•kernel.org
Subject: Re: Is Git Add Supposed to Work Like This (git 2.50)?
Date: Tue, 09 Sep 2025 13:55:05 -0700 [thread overview]
Message-ID: <xmqqsegvtkgm.fsf@gitster.g> (raw)
In-Reply-To: <20250909184231.GB1912898@coredump.intra.peff.net> (Jeff King's message of "Tue, 9 Sep 2025 14:42:31 -0400")
Jeff King <peff@peff•net> writes:
> Oops, I think our mails just crossed. I don't think --ignore-errors does
> quite what you want, though:
>
> $ touch foo
> $ git add foo bar
> fatal: pathspec 'bar' did not match any files
> $ git add --ignore-errors foo bar
> fatal: pathspec 'bar' did not match any files
> $ git status --porcelain
> ?? foo
The option is described like so:
--[no-]ignore-errors just skip files which cannot be added because of errors
I think "because of errors" is meant handle a sequence more like this:
$ date >foo ; date >bar
$ chmod a= foo
$ git add --ignore-errors foo bar
$ git diff --cached --name-only
bar
next prev parent reply other threads:[~2025-09-09 20:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-07 2:02 Is Git Add Supposed to Work Like This (git 2.50)? Jon Forrest
2025-09-07 8:10 ` Re " K Jayatheerth
2025-09-07 23:34 ` Jeff King
2025-09-09 16:00 ` Jon Forrest
2025-09-09 18:33 ` Jon Forrest
2025-09-09 18:42 ` Jeff King
2025-09-09 20:55 ` Junio C Hamano [this message]
2025-09-09 21:01 ` Jeff King
2025-09-09 18:40 ` 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=xmqqsegvtkgm.fsf@gitster.g \
--to=gitster@pobox$(echo .)com \
--cc=git@vger$(echo .)kernel.org \
--cc=nobozo@gmail$(echo .)com \
--cc=peff@peff$(echo .)net \
/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