t/t4102-apply-rename.sh: avoid "test <cond> -a/-o <cond>"
[gitweb.git] / builtin / checkout.c
index c4db4ca9310b134ffc50537d1bc8da9e4cc5acfc..f1dc56e55f7b2200412142b10517458ccfda2952 100644 (file)
@@ -624,7 +624,7 @@ static void update_refs_for_switch(const struct checkout_opts *opts,
                /* Nothing to do. */
        } else if (opts->force_detach || !new->path) {  /* No longer on any branch. */
                update_ref(msg.buf, "HEAD", new->commit->object.sha1, NULL,
-                          REF_NODEREF, DIE_ON_ERR);
+                          REF_NODEREF, UPDATE_REFS_DIE_ON_ERR);
                if (!opts->quiet) {
                        if (old->path && advice_detached_head)
                                detach_advice(new->name);