update-ref.c: extract a new function, parse_refname()
[gitweb.git] / builtin / checkout.c
index 1b86d9c868c35c7f0ad3f4b39f9d225c8365c77c..6bf23188c9e68dbfacb3f99bb8118602cb578086 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);