My Various Git Projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16fc2b7
)
sequencer: do not update/refresh index if the lock cannot be held
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Mon, 28 Apr 2014 10:55:24 +0000
(17:55 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 29 Apr 2014 19:43:16 +0000
(12:43 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c
patch
|
blob
|
history
diff --git
a/sequencer.c
b/sequencer.c
index
bde5f04
..
7b886a6
100644
(file)
--- a/
sequencer.c
+++ b/
sequencer.c
@@
-679,7
+679,7
@@
static void read_and_refresh_cache(struct replay_opts *opts)
if (read_index_preload(&the_index, NULL) < 0)
die(_("git %s: failed to read the index"), action_name(opts));
refresh_index(&the_index, REFRESH_QUIET|REFRESH_UNMERGED, NULL, NULL, NULL);
- if (the_index.cache_changed) {
+ if (the_index.cache_changed
&& index_fd >= 0
) {
if (write_index(&the_index, index_fd) ||
commit_locked_index(&index_lock))
die(_("git %s: failed to refresh the index"), action_name(opts));