summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c
index 391738e39..26cd83851 100644
--- a/src/index.c
+++ b/src/index.c
@@ -3014,7 +3014,7 @@ int git_index_read_index(
INSERT_IN_MAP_EX(index, new_entries_map, add_entry, error);
}
- if (remove_entry && !error)
+ if (remove_entry && error >= 0)
error = git_vector_insert(&remove_entries, remove_entry);
if (error < 0) {