Please describe the problem.

Initially filed/expressed myself on datalad issues but decided to duplicate here.

Since git-annex 10.20230126-78-g452b080db AKA 10.20230214~12 (so rapidly released after introduction while datalad testing just got a chance to start breaking/me report): behavior change was not just about a nonzero exit but rather that git-annex no longer bothers to output any info for any file as soon as it encounters the path it doesn't know.

In the case of untracked , completely wrong, and annexed file:

❯ git status
On branch dl-test-branch
Your branch is up to date with 'dl-test-remote/dl-test-branch'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)
    not-committed.txt

nothing added to commit but untracked files present (use "git add" to track)
❯ ls -l
total 8
-rw------- 1 yoh yoh   3 Feb 16 22:10 not-committed.txt
lrwxrwxrwx 1 yoh yoh 186 Feb 16 22:10 test-annex.dat -> .git/annex/objects/Gm/mv/SHA256E-s7--ed7002b439e9ac845f22357d822bac1444730fbdb6016d3ec9432297b9ec9f73.dat/SHA256E-s7--ed7002b439e9ac845f22357d822bac1444730fbdb6016d3ec9432297b9ec9f73.dat

Compare behavior before:

❯ ( source ~/git-annexes/10.20230126.env; git annex version | head -n 1; git annex info --json --json-error-messages not-committed.txt INFO.txt test-annex.dat; echo exit $?)
git-annex version: 10.20230126-1~ndall+1
fatal: Not a valid object name not-committed.txt
{"command":"info","note":"not a directory or an annexed file or a treeish or a remote or a uuid","success":false,"input":["not-committed.txt"],"error-messages":[],"file":"not-committed.txt"}
fatal: Not a valid object name INFO.txt
{"command":"info","note":"not a directory or an annexed file or a treeish or a remote or a uuid","success":false,"input":["INFO.txt"],"error-messages":[],"file":"INFO.txt"}
{"command":"info test-annex.dat","size":"7 bytes","success":true,"input":["test-annex.dat"],"key":"SHA256E-s7--ed7002b439e9ac845f22357d822bac1444730fbdb6016d3ec9432297b9ec9f73.dat","error-messages":[],"present":false,"file":"test-annex.dat"}
exit 0

where it did spit out errors to stderr but nevertheless trustfully returned json records for all files and eventually for the one it knows about (and we rely on such behavior!) to now

❯ ( source ~/git-annexes/10.20230214.env; git annex version | head -n 1; git annex info --json --json-error-messages not-committed.txt INFO.txt test-annex.dat ; echo exit $?)
git-annex version: 10.20230214-1~ndall+1
fatal: Not a valid object name not-committed.txt
git-annex: not a directory or an annexed file or a treeish or a remote or a uuid
exit 1

where we get only immediate error message to stderr and not a single record is output.

IMHO prior behavior is "more correct" and we rely on it in datalad - get responses per each path. If it exits with non-0 after, that is ok with me. If it stops producing results completely, it would be an extra effort first sort out paths first.

fixed --Joey