summaryrefslogtreecommitdiff
path: root/add-patch.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-09-19 00:58:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-19 00:58:04 (GMT)
commit694e517778243256b748819cc60eff6011238a0a (patch)
tree4692698c62330278df6d55a94fa1bc33044eb667 /add-patch.c
parent3ad8d3e4f9855de6444b081e59328a55de1def80 (diff)
parent1c6ffb546bf5d31c2cef2fefc86317658fda59e0 (diff)
downloadgit-694e517778243256b748819cc60eff6011238a0a.zip
git-694e517778243256b748819cc60eff6011238a0a.tar.gz
git-694e517778243256b748819cc60eff6011238a0a.tar.bz2
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 2fcab98..cd5cfc9 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);
}