update-ref: fix "verify" command with missing <oldvalue>
[gitweb.git] / builtin / clone.c
index 4340477925b3ce0d665d1ddabba29f0d83c58fb1..d5e7532105aa66c5b7e04e170489cf905928b5bb 100644 (file)
@@ -9,6 +9,7 @@
  */
 
 #include "builtin.h"
+#include "lockfile.h"
 #include "parse-options.h"
 #include "fetch-pack.h"
 #include "refs.h"
@@ -619,7 +620,7 @@ static int checkout(void)
        if (option_no_checkout)
                return 0;
 
-       head = resolve_refdup("HEAD", sha1, 1, NULL);
+       head = resolve_refdup("HEAD", RESOLVE_REF_READING, sha1, NULL);
        if (!head) {
                warning(_("remote HEAD refers to nonexistent ref, "
                          "unable to checkout.\n"));