Re: Possible bug or error in document?

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

 



KwonHyun Kim <kwonhyun.kim@xxxxxxxxx> writes:

> --ignore-errors
>            If some files could not be added because of errors indexing
> them, do not abort the operation, but continue adding the others. The
> command shall still exit with non-zero
>            status. The configuration variable add.ignoreErrors can be
> set to true to make this the default behaviour.

I think "--ignore-errors" is meant to ignore errors only about
"adding" a discovered path (i.e. the exact path that user wants to
add) to the index.  Perhaps the file exists, but an I/O error
prevents Git from reading it fully, causing it to fail computing the
blob object name.  Such an error is ignored and other paths that got
successfully computed their hashes are added to the index.

On the other hand, errors while discovering what exact paths the
user wants to add are not ignored.  So "git add --ignore-errors --
no-such-file" would still error out in order to notify you that you
asked for no-such-file that does not exist, and "--pathspec-from"
does not change the story.

What is missing from "git add" might be the "--ignore-unmatch"
option that "git rm" has.  There are other commands that supports a
similarly named "--ignore-missing" option, and we may #leftoverbits
want to unify them over time (i.e. decide which one to use in the
longer term, say "--ignore-missing", teach "git rm" that
"--ignore-missing" is a new synonym for "--ignore-unmatch", add
"--ignore-missing" to "git add" and probably other commands that
would benefit from having it, and then in a far enough future,
retire "--ignore-unmatch" from "git rm").





[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