commit 9b4603c0290867d82a4f4f30cc49ae4e30789084 from: Stefan Sperling date: Mon Jan 31 16:27:14 2022 UTC improve 'got add' error message if file does not exist; reported by Timo Myyrä ok tracey commit - c7b1723265fdbbef35d01135261fab2ca7d52f88 commit + 9b4603c0290867d82a4f4f30cc49ae4e30789084 blob - 02ace087b87f181bf1e2f38cb278ab69608602f7 blob + 610c0eb85518f221f5f8ae1907397ddd07bea422 --- lib/worktree.c +++ lib/worktree.c @@ -3874,7 +3874,10 @@ schedule_addition(void *arg, unsigned char status, uns } if (status != GOT_STATUS_UNVERSIONED) { - err = got_error_path(ondisk_path, GOT_ERR_FILE_STATUS); + if (status == GOT_STATUS_NONEXISTENT) + err = got_error_set_errno(ENOENT, ondisk_path); + else + err = got_error_path(ondisk_path, GOT_ERR_FILE_STATUS); goto done; }