]> git.ipfire.org Git - thirdparty/git.git/blobdiff - sequencer.c
Merge branch 'maint-2.1' into maint
[thirdparty/git.git] / sequencer.c
index 5e8a207474bc6971a0de4f9ff6160a5681ac7b6d..a03d4fa2521fbc119a8d6b471b9e3c1046610b84 100644 (file)
@@ -1,4 +1,5 @@
 #include "cache.h"
+#include "lockfile.h"
 #include "sequencer.h"
 #include "dir.h"
 #include "object.h"
@@ -251,8 +252,8 @@ static int fast_forward_to(const unsigned char *to, const unsigned char *from,
        if (!transaction ||
            ref_transaction_update(transaction, "HEAD",
                                   to, unborn ? null_sha1 : from,
-                                  0, 1, &err) ||
-           ref_transaction_commit(transaction, sb.buf, &err)) {
+                                  0, 1, sb.buf, &err) ||
+           ref_transaction_commit(transaction, &err)) {
                ref_transaction_free(transaction);
                error("%s", err.buf);
                strbuf_release(&sb);
@@ -330,7 +331,7 @@ static int is_index_unchanged(void)
        unsigned char head_sha1[20];
        struct commit *head_commit;
 
-       if (!resolve_ref_unsafe("HEAD", head_sha1, 1, NULL))
+       if (!resolve_ref_unsafe("HEAD", RESOLVE_REF_READING, head_sha1, NULL))
                return error(_("Could not resolve HEAD commit\n"));
 
        head_commit = lookup_commit(head_sha1);
@@ -870,7 +871,7 @@ static int rollback_single_pick(void)
        if (!file_exists(git_path("CHERRY_PICK_HEAD")) &&
            !file_exists(git_path("REVERT_HEAD")))
                return error(_("no cherry-pick or revert in progress"));
-       if (read_ref_full("HEAD", head_sha1, 0, NULL))
+       if (read_ref_full("HEAD", 0, head_sha1, NULL))
                return error(_("cannot resolve HEAD"));
        if (is_null_sha1(head_sha1))
                return error(_("cannot abort from a branch yet to be born"));