Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'add-patch.c')
-rw-r--r--add-patch.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/add-patch.c b/add-patch.c
index 33ecd8398a..a86a92e164 100644
--- a/add-patch.c
+++ b/add-patch.c
@@ -1750,7 +1750,8 @@ int run_add_p(struct repository *r, enum add_p_mode mode,
s.mode = &patch_mode_add;
s.revision = revision;
- if (discard_index(r->index) < 0 || repo_read_index(r) < 0 ||
+ discard_index(r->index);
+ if (repo_read_index(r) < 0 ||
(!s.mode->index_only &&
repo_refresh_and_write_index(r, REFRESH_QUIET, 0, 1,
NULL, NULL, NULL) < 0) ||