built-in rebase: use the correct reflog when switching branches
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sun, 3 Mar 2019 17:11:54 +0000 (09:11 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 4 Mar 2019 04:31:04 +0000 (13:31 +0900)
By mistake, we used the reflog intended for ORIG_HEAD.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/rebase.c
index 813ec284ca0abd719164f5732f33ec4e96f73333..aa469ec964d5c05a3dee6256d869e932d6f127ac 100644 (file)
@@ -475,7 +475,7 @@ static int reset_head(struct object_id *oid, const char *action,
                                 detach_head ? REF_NO_DEREF : 0,
                                 UPDATE_REFS_MSG_ON_ERR);
        else {
-               ret = update_ref(reflog_orig_head, switch_to_branch, oid,
+               ret = update_ref(reflog_head, switch_to_branch, oid,
                                 NULL, 0, UPDATE_REFS_MSG_ON_ERR);
                if (!ret)
                        ret = create_symref("HEAD", switch_to_branch,