All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: KwonHyun Kim <kwonhyun.kim@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Possible bug or error in document?
Date: Wed, 31 Jul 2024 08:44:46 -0700	[thread overview]
Message-ID: <xmqqh6c58t1t.fsf@gitster.g> (raw)
In-Reply-To: <CADLV-7+mQ0K6_-L_Pws9yOYfQ++b4NyH5+FXwbyHuXBiOALeYA@mail.gmail.com> (KwonHyun Kim's message of "Wed, 31 Jul 2024 15:08:50 +0900")

KwonHyun Kim <kwonhyun.kim@gmail.com> 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").


      reply	other threads:[~2024-07-31 15:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31  6:08 Possible bug or error in document? KwonHyun Kim
2024-07-31 15:44 ` Junio C Hamano [this message]

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=xmqqh6c58t1t.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=kwonhyun.kim@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.