{"thread":{"id":"61873","subject":"Possible bug or error in document?","startedAt":"2024-07-31T06:09:01Z","lastAt":"2024-07-31T15:44:52Z","messageCount":2,"participants":["KwonHyun Kim","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"499666","messageId":"CADLV-7+mQ0K6_-L_Pws9yOYfQ++b4NyH5+FXwbyHuXBiOALeYA@mail.gmail.com","threadId":"61873","inReplyTo":null,"subject":"Possible bug or error in document?","fromName":"KwonHyun Kim","fromEmail":"kwonhyun.kim@gmail.com","sentAt":"2024-07-31T06:08:50Z","receivedAt":"2024-07-31T06:09:01Z","isPatch":false,"sender":{"key":"kwonhyun.kim@gmail.com","avatar":null},"body":"Hello there, I have a possible bug or possible error in document.\n\n  When I do `git add --pathspec-from=.gitadd --ignore-errors` I can\nthe following error\n\n```\n$ git add --pathspec-from=.gitadd --ignore-errors\nfatal: pathspec 'chapter???.R' did not match any files\n```\n\n  I figured from what I read from the help, --ignore-errors means add\nwhatever possible(help included in the following)\n\n--ignore-errors\n           If some files could not be added because of errors indexing\nthem, do not abort the operation, but continue adding the others. The\ncommand shall still exit with non-zero\n           status. The configuration variable add.ignoreErrors can be\nset to true to make this the default behaviour.\n\n  So is it me possibly misunderstanding English, or it might be git\ndoing something wrong or document directing someone in the wrong\ndirection...\n\n  I thought I might use this option(--pathsepc-from=) like using\n.gitignore in the opposite way but it seems that I need to make my own\nscript to read line by line and do `git add`\n\n  Thank you for reading.\n\nKwH Kim\n"},{"id":"499706","messageId":"xmqqh6c58t1t.fsf@gitster.g","threadId":"61873","inReplyTo":"CADLV-7+mQ0K6_-L_Pws9yOYfQ++b4NyH5+FXwbyHuXBiOALeYA@mail.gmail.com","subject":"Re: Possible bug or error in document?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2024-07-31T15:44:46Z","receivedAt":"2024-07-31T15:44:52Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"KwonHyun Kim <kwonhyun.kim@gmail.com> writes:\n\n> --ignore-errors\n>            If some files could not be added because of errors indexing\n> them, do not abort the operation, but continue adding the others. The\n> command shall still exit with non-zero\n>            status. The configuration variable add.ignoreErrors can be\n> set to true to make this the default behaviour.\n\nI think \"--ignore-errors\" is meant to ignore errors only about\n\"adding\" a discovered path (i.e. the exact path that user wants to\nadd) to the index.  Perhaps the file exists, but an I/O error\nprevents Git from reading it fully, causing it to fail computing the\nblob object name.  Such an error is ignored and other paths that got\nsuccessfully computed their hashes are added to the index.\n\nOn the other hand, errors while discovering what exact paths the\nuser wants to add are not ignored.  So \"git add --ignore-errors --\nno-such-file\" would still error out in order to notify you that you\nasked for no-such-file that does not exist, and \"--pathspec-from\"\ndoes not change the story.\n\nWhat is missing from \"git add\" might be the \"--ignore-unmatch\"\noption that \"git rm\" has.  There are other commands that supports a\nsimilarly named \"--ignore-missing\" option, and we may #leftoverbits\nwant to unify them over time (i.e. decide which one to use in the\nlonger term, say \"--ignore-missing\", teach \"git rm\" that\n\"--ignore-missing\" is a new synonym for \"--ignore-unmatch\", add\n\"--ignore-missing\" to \"git add\" and probably other commands that\nwould benefit from having it, and then in a far enough future,\nretire \"--ignore-unmatch\" from \"git rm\").\n\n"}]}