aboutsummaryrefslogtreecommitdiff
path: root/builtin-merge.c
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@frugalware.org>2008-09-06 18:29:49 +0200
committerJunio C Hamano <gitster@pobox.com>2008-09-06 19:49:51 -0700
commit4271666046b4b3e655eab88821096539099f3b14 (patch)
tree87394519648f87f4f9141867bd7d37ccd7422046 /builtin-merge.c
parenta6f63ae002237c2eb416d4e2cb43227522e4ea9a (diff)
downloadgit-4271666046b4b3e655eab88821096539099f3b14.tar.gz
git-4271666046b4b3e655eab88821096539099f3b14.tar.xz
builtin-merge: release the lockfile in try_merge_strategy()
Once we committed the locked index, we should release the lockfile. In most cases this is done automatically when the process ends, but this is not true in this case. [jc: with additional tests from Eric Raible] Signed-off-by: Miklos Vajna <vmiklos@frugalware.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-merge.c')
-rw-r--r--builtin-merge.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin-merge.c b/builtin-merge.c
index b857cf624..bb09e6fb3 100644
--- a/builtin-merge.c
+++ b/builtin-merge.c
@@ -576,6 +576,7 @@ static int try_merge_strategy(const char *strategy, struct commit_list *common,
(write_cache(index_fd, active_cache, active_nr) ||
commit_locked_index(lock)))
die ("unable to write %s", get_index_file());
+ rollback_lock_file(lock);
return clean ? 0 : 1;
} else {
args = xmalloc((4 + commit_list_count(common) +