]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin-fetch-pack.c
Enhance hold_lock_file_for_{update,append}() API
[thirdparty/git.git] / builtin-fetch-pack.c
index 85509f5ee5884589980c9a1c5f96b66a3d49d5dd..21ce3e016314e0c8500c9010b2ff214b1e05e022 100644 (file)
@@ -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);