summaryrefslogtreecommitdiff
path: root/builtin-fetch-pack.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2008-10-21 17:58:11 -0700
committerJunio C Hamano <gitster@pobox.com>2008-10-21 17:58:11 -0700
commita157400c972bbdeab2b5629658c99839c855f5ab (patch)
tree95c9ae9bf86dcc6e2bd4a3b0b217f5bef8622b59 /builtin-fetch-pack.c
parent6af50f7536d559f891d08597203ba605726511d6 (diff)
parentacd3b9eca82e38950f94e4708b528b7dae09a7c8 (diff)
downloadgit-a157400c972bbdeab2b5629658c99839c855f5ab.tar.gz
Merge branch 'jc/maint-co-track'
* jc/maint-co-track: Enhance hold_lock_file_for_{update,append}() API demonstrate breakage of detached checkout with symbolic link HEAD Fix "checkout --track -b newbranch" on detached HEAD Conflicts: builtin-commit.c
Diffstat (limited to 'builtin-fetch-pack.c')
-rw-r--r--builtin-fetch-pack.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index fa3c936493..372bfa20a2 100644
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
@@ -813,7 +813,8 @@ struct ref *fetch_pack(struct fetch_pack_args *my_args,
)
die("shallow file was changed during fetch");
- fd = hold_lock_file_for_update(&lock, shallow, 1);
+ fd = hold_lock_file_for_update(&lock, shallow,
+ LOCK_DIE_ON_ERROR);
if (!write_shallow_commits(fd, 0)) {
unlink(shallow);
rollback_lock_file(&lock);