mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-08 19:51:31 +00:00
index_read_index: reset error correctly
Clear any error state upon each iteration. If one of the iterations ends (with an error of `GIT_ITEROVER`) we need to reset that error to 0, lest we stop the whole process prematurely.
This commit is contained in:
parent
5baa20b86e
commit
93de20b8d2
@ -2968,6 +2968,8 @@ int git_index_read_index(
|
||||
*remove_entry = NULL;
|
||||
int diff;
|
||||
|
||||
error = 0;
|
||||
|
||||
if (old_entry && new_entry)
|
||||
diff = git_index_entry_cmp(old_entry, new_entry);
|
||||
else if (!old_entry && new_entry)
|
||||
|
Loading…
Reference in New Issue
Block a user