Code

Merge branch 'maint'
[git.git] / builtin-fetch-pack.c
index 4dfef29bcd23a174593203e521247a3d4209cf89..372bfa20a2eac978f7511f5d8d9296be789b527f 100644 (file)
@@ -735,7 +735,7 @@ int cmd_fetch_pack(int argc, const char **argv, const char *prefix)
        conn = git_connect(fd, (char *)dest, args.uploadpack,
                           args.verbose ? CONNECT_VERBOSE : 0);
        if (conn) {
-               get_remote_heads(fd[0], &ref, 0, NULL, 0);
+               get_remote_heads(fd[0], &ref, 0, NULL, 0, NULL);
 
                ref = fetch_pack(&args, fd, conn, ref, dest, nr_heads, heads, NULL);
                close(fd[0]);
@@ -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);