summaryrefslogtreecommitdiff
path: root/add-patch.c
diff options
context:
space:
mode:
Diffstat (limited to 'add-patch.c')
-rw-r--r--add-patch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/add-patch.c b/add-patch.c
index f899389e2c..e6fa10715d 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1624,7 +1624,7 @@ soft_increment:
NULL, 0, NULL, 0))
error(_("'git apply' failed"));
}
- if (!repo_read_index(s->s.r))
+ if (repo_read_index(s->s.r) >= 0)
repo_refresh_and_write_index(s->s.r, REFRESH_QUIET, 0,
1, NULL, NULL, NULL);
}