Merge branch 'jk/progress-delay-fix'
[gitweb.git] / builtin / clone.c
index cf6eddc9c56b9fda95ff8d9764a2d5f09b7d20b4..b22845738afe68e61d45883e89a470213de921ef 100644 (file)
@@ -689,7 +689,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);
                /* --branch specifies a non-branch (i.e. tags), detach HEAD */
-               update_ref(msg, "HEAD", &c->object.oid, NULL, REF_NODEREF,
+               update_ref(msg, "HEAD", &c->object.oid, NULL, REF_NO_DEREF,
                           UPDATE_REFS_DIE_ON_ERR);
        } else if (remote) {
                /*
@@ -697,7 +697,7 @@ static void update_head(const struct ref *our, const struct ref *remote,
                 * HEAD points to a branch but we don't know which one.
                 * Detach HEAD in all these cases.
                 */
-               update_ref(msg, "HEAD", &remote->old_oid, NULL, REF_NODEREF,
+               update_ref(msg, "HEAD", &remote->old_oid, NULL, REF_NO_DEREF,
                           UPDATE_REFS_DIE_ON_ERR);
        }
 }