git_status_file would always return GIT_ENOTFOUND for these files. The underlying bug was that git__strcmp_cb, which is used by git_path_with_stat_cmp to sort entries in the working directory, compares strings based on unsigned chars (this is confirmed by the strcmp(3) manpage), while git__prefixcmp, which is used by workdir_iterator__entry_cmp to search for a path in the working directory, compares strings based on char. So the sort puts this path at the end of the list, while the search expects it to be at the beginning. The fix was simply to make git__prefixcmp compare using unsigned chars, just like strcmp(3). The rest of the change is just adding/updating tests.
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
attr | Loading commit data... | |
buf | Loading commit data... | |
commit | Loading commit data... | |
config | Loading commit data... | |
core | Loading commit data... | |
diff | Loading commit data... | |
index | Loading commit data... | |
network | Loading commit data... | |
notes | Loading commit data... | |
object | Loading commit data... | |
odb | Loading commit data... | |
refs | Loading commit data... | |
repo | Loading commit data... | |
resources | Loading commit data... | |
revwalk | Loading commit data... | |
status | Loading commit data... | |
threads | Loading commit data... | |
README.md | Loading commit data... | |
clar | Loading commit data... | |
clar_helpers.c | Loading commit data... | |
clar_libgit2.h | Loading commit data... |