File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ case "$#" in
473473 head_name=" detached HEAD"
474474 branch_name=HEAD ; # detached
475475 fi
476- orig_head=$( git rev-parse --verify " ${branch_name} ^0 " ) || exit
476+ orig_head=$( git rev-parse --verify HEAD ) || exit
477477 ;;
478478* )
479479 die " BUG: unexpected number of arguments left to parse"
Original file line number Diff line number Diff line change @@ -101,7 +101,14 @@ test_expect_success 'HEAD was detached during rebase' '
101101 test $(git rev-parse HEAD@{1}) != $(git rev-parse my-topic-branch@{1})
102102'
103103
104+ test_expect_success ' rebase from ambiguous branch name' '
105+ git checkout -b topic side &&
106+ git rebase master
107+ '
108+
104109test_expect_success ' rebase after merge master' '
110+ git checkout --detach refs/tags/topic &&
111+ git branch -D topic &&
105112 git reset --hard topic &&
106113 git merge master &&
107114 git rebase master &&
You can’t perform that action at this time.
0 commit comments