summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-11-15 12:14:29 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-11-15 12:14:29 +0900
commita97222978ab3e0e86e87dccacf59269a9060de9e (patch)
treef1df1c3ca9d591a3a5dc063041bf537106ce068b /sequencer.c
parentMerge branch 'sr/wrapper-quote-filenames' (diff)
parentrefs: update some more docs to use "oid" rather than "sha1" (diff)
downloadtgif-a97222978ab3e0e86e87dccacf59269a9060de9e.tar.xz
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 'sequencer.c')
-rw-r--r--sequencer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sequencer.c b/sequencer.c
index cfc1263912..19dd575ed9 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -1117,11 +1117,11 @@ static int do_pick_commit(enum todo_command command, struct commit *commit,
*/
if (command == TODO_PICK && !opts->no_commit && (res == 0 || res == 1) &&
update_ref(NULL, "CHERRY_PICK_HEAD", &commit->object.oid, NULL,
- REF_NODEREF, UPDATE_REFS_MSG_ON_ERR))
+ REF_NO_DEREF, UPDATE_REFS_MSG_ON_ERR))
res = -1;
if (command == TODO_REVERT && ((opts->no_commit && res == 0) || res == 1) &&
update_ref(NULL, "REVERT_HEAD", &commit->object.oid, NULL,
- REF_NODEREF, UPDATE_REFS_MSG_ON_ERR))
+ REF_NO_DEREF, UPDATE_REFS_MSG_ON_ERR))
res = -1;
if (res) {
@@ -2130,7 +2130,7 @@ cleanup_head_ref:
msg = reflog_message(opts, "finish", "%s onto %s",
head_ref.buf, buf.buf);
if (update_ref(msg, head_ref.buf, &head, &orig,
- REF_NODEREF, UPDATE_REFS_MSG_ON_ERR)) {
+ REF_NO_DEREF, UPDATE_REFS_MSG_ON_ERR)) {
res = error(_("could not update %s"),
head_ref.buf);
goto cleanup_head_ref;