diff mbox series

[2/4] built-in rebase: use the correct reflog when switching branches

Message ID b92d76065d92cb7003dd9d69525a1ed790a93921.1551367664.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series Fix ORIG_HEAD behavior of the built-in rebase | expand

Commit Message

Philippe Blain via GitGitGadget Feb. 28, 2019, 3:27 p.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

By mistake, we used the reflog intended for ORIG_HEAD.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 builtin/rebase.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/builtin/rebase.c b/builtin/rebase.c
index 813ec284ca..aa469ec964 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -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,