Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2018-11-18 12:23:55 +0300
committerJunio C Hamano <gitster@pobox.com>2018-11-18 12:23:55 +0300
commit9aefd353804b744e05f253fb196029be620b26c0 (patch)
treea3fc63fb2803a3177958643e11b105ff3a22dcf4 /builtin
parenta5170794372cf1325710a3419473c91ec4af53bf (diff)
parent176f5d965ba128f79a51d6c8d1620506672403e1 (diff)
Merge branch 'js/rebase-autostash-detach-fix'
"git rebase --autostash" did not correctly re-attach the HEAD at times. * js/rebase-autostash-detach-fix: built-in rebase --autostash: leave the current branch alone if possible built-in rebase: demonstrate regression with --autostash
Diffstat (limited to 'builtin')
-rw-r--r--builtin/rebase.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/rebase.c b/builtin/rebase.c
index b84568fc4e..6db1b7cc56 100644
--- a/builtin/rebase.c
+++ b/builtin/rebase.c
@@ -613,7 +613,8 @@ static int reset_head(struct object_id *oid, const char *action,
reflog_head = msg.buf;
}
if (!switch_to_branch)
- ret = update_ref(reflog_head, "HEAD", oid, orig, REF_NO_DEREF,
+ ret = update_ref(reflog_head, "HEAD", oid, orig,
+ detach_head ? REF_NO_DEREF : 0,
UPDATE_REFS_MSG_ON_ERR);
else {
ret = create_symref("HEAD", switch_to_branch, msg.buf);