commit - c7b1723265fdbbef35d01135261fab2ca7d52f88
commit + 9b4603c0290867d82a4f4f30cc49ae4e30789084
blob - 02ace087b87f181bf1e2f38cb278ab69608602f7
blob + 610c0eb85518f221f5f8ae1907397ddd07bea422
--- lib/worktree.c
+++ lib/worktree.c
}
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;
}