summaryrefslogtreecommitdiffstats
path: root/add-patch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-19 02:58:04 +0200
committerJunio C Hamano <gitster@pobox.com>2020-09-19 02:58:04 +0200
commit694e517778243256b748819cc60eff6011238a0a (patch)
tree4692698c62330278df6d55a94fa1bc33044eb667 /add-patch.c
parentMerge branch 'pw/add-p-leakfix' (diff)
parentadd--interactive.perl: specify --no-color explicitly (diff)
downloadgit-694e517778243256b748819cc60eff6011238a0a.tar.xz
git-694e517778243256b748819cc60eff6011238a0a.zip
Merge branch 'jk/add-i-fixes'
"add -i/-p" fixes. * jk/add-i-fixes: add--interactive.perl: specify --no-color explicitly add-patch: fix inverted return code of repo_read_index()
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 2fcab983a6..cd5cfc93fa 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1655,7 +1655,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);
}