summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-11-15 03:14:29 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-11-15 03:14:29 (GMT)
commita97222978ab3e0e86e87dccacf59269a9060de9e (patch)
treef1df1c3ca9d591a3a5dc063041bf537106ce068b /builtin/checkout.c
parent61f68f607367293d0edb5c297094da1d83cd7fcb (diff)
parent78fb457968591887ebb331d3d0475c00c7dbb317 (diff)
downloadgit-a97222978ab3e0e86e87dccacf59269a9060de9e.zip
git-a97222978ab3e0e86e87dccacf59269a9060de9e.tar.gz
git-a97222978ab3e0e86e87dccacf59269a9060de9e.tar.bz2
Merge branch 'mh/tidy-ref-update-flags'
Code clean-up in refs API implementation. * mh/tidy-ref-update-flags: refs: update some more docs to use "oid" rather than "sha1" write_packed_entry(): take `object_id` arguments refs: rename constant `REF_ISPRUNING` to `REF_IS_PRUNING` refs: rename constant `REF_NODEREF` to `REF_NO_DEREF` refs: tidy up and adjust visibility of the `ref_update` flags ref_transaction_add_update(): remove a check ref_transaction_update(): die on disallowed flags prune_ref(): call `ref_transaction_add_update()` directly files_transaction_prepare(): don't leak flags to packed transaction
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index 6c2b4cd..7d8bcc3 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -663,7 +663,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.oid, NULL,
- REF_NODEREF, UPDATE_REFS_DIE_ON_ERR);
+ REF_NO_DEREF, UPDATE_REFS_DIE_ON_ERR);
if (!opts->quiet) {
if (old->path &&
advice_detached_head && !opts->force_detach)