summaryrefslogtreecommitdiff
path: root/src/commit.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2016-05-03 17:36:09 +0200
committerPatrick Steinhardt <ps@pks.im>2016-05-03 18:19:20 +0200
commitfe3057b4b9bbab028d7cd18ce06edc034847f844 (patch)
tree496628e449221d8c727bd352b2ed5d5fb14cc0db /src/commit.c
parent153fde5b4349f12de4f152c26d3b298e58a69cd8 (diff)
downloadlibgit2-fe3057b4b9bbab028d7cd18ce06edc034847f844.tar.gz
diff: simplify code for handling empty dirs
When determining diffs between two iterators we may need to recurse into an unmatched directory for the "new" iterator when it is either a prefix to the current item of the "old" iterator or when untracked/ignored changes are requested by the user and the directory is untracked/ignored. When advancing into the directory and no files are found, we will get back `GIT_ENOTFOUND`. If so, we simply skip the directory, handling resulting unmatched old items in the next iteration. The other case of `iterator_advance_into` returning either `GIT_NOERROR` or any other error but `GIT_ENOTFOUND` will be handled by the caller, which will now either compare the first directory entry of the "new" iterator in case of `GIT_ENOERROR` or abort on other cases. Improve readability of the code to make the above logic more clear.
Diffstat (limited to 'src/commit.c')
0 files changed, 0 insertions, 0 deletions