Merge branch 'nd/ita-cleanup' into maint
[gitweb.git] / builtin / clone.c
index 215d015f16483384acef4ed67a3e8570c2410e4c..a0b3cd9e5617b5a3a45dd01c8a2c7af0b2fd9668 100644 (file)
@@ -657,7 +657,7 @@ static void update_head(const struct ref *our, const struct ref *remote,
        } else if (our) {
                struct commit *c = lookup_commit_reference(our->old_oid.hash);
                /* --branch specifies a non-branch (i.e. tags), detach HEAD */
-               update_ref(msg, "HEAD", c->object.sha1,
+               update_ref(msg, "HEAD", c->object.oid.hash,
                           NULL, REF_NODEREF, UPDATE_REFS_DIE_ON_ERR);
        } else if (remote) {
                /*