summaryrefslogtreecommitdiffstats
path: root/merge-recursive.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-13 03:34:36 +0200
committerJunio C Hamano <junkio@cox.net>2006-08-13 03:35:14 +0200
commiteed94a570e0421175d6b4342c0ac48e03ceedf0b (patch)
treef33864f2abffdcb83cbf626b26da34f9cc8d5bab /merge-recursive.c
parentdiscard_cache(): discard index, even if no file was mmap()ed (diff)
parentGIT 1.4.2 (diff)
downloadgit-eed94a570e0421175d6b4342c0ac48e03ceedf0b.tar.xz
git-eed94a570e0421175d6b4342c0ac48e03ceedf0b.zip
Merge branch 'master' into js/c-merge-recursive
Adjust to hold_lock_file_for_update() change on the master.
Diffstat (limited to 'merge-recursive.c')
-rw-r--r--merge-recursive.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c
index 454e293578..048cca1d13 100644
--- a/merge-recursive.c
+++ b/merge-recursive.c
@@ -125,9 +125,7 @@ static int flush_cache(void)
{
/* flush temporary index */
struct lock_file *lock = xcalloc(1, sizeof(struct lock_file));
- int fd = hold_lock_file_for_update(lock, current_index_file);
- if (fd < 0)
- die("could not lock %s", lock->filename);
+ int fd = hold_lock_file_for_update(lock, current_index_file, 1);
if (write_cache(fd, active_cache, active_nr) ||
close(fd) || commit_lock_file(lock))
die ("unable to write %s", current_index_file);