Re: Is Git Add Supposed to Work Like This (git 2.50)?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Sep 09, 2025 at 01:55:05PM -0700, Junio C Hamano wrote:

> Jeff King <peff@xxxxxxxx> 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
> 

Yeah, I don't think --ignore-errors is misbehaving, and I read that doc.
I just meant that it would not do the thing Jon is asking for. That is
more like --ignore-missing.

-Peff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux