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
473
473
head_name=" detached HEAD"
474
474
branch_name=HEAD ; # detached
475
475
fi
476
- orig_head=$( git rev-parse --verify " ${branch_name} ^0 " ) || exit
476
+ orig_head=$( git rev-parse --verify HEAD ) || exit
477
477
;;
478
478
* )
479
479
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' '
101
101
test $(git rev-parse HEAD@{1}) != $(git rev-parse my-topic-branch@{1})
102
102
'
103
103
104
+ test_expect_success ' rebase from ambiguous branch name' '
105
+ git checkout -b topic side &&
106
+ git rebase master
107
+ '
108
+
104
109
test_expect_success ' rebase after merge master' '
110
+ git checkout --detach refs/tags/topic &&
111
+ git branch -D topic &&
105
112
git reset --hard topic &&
106
113
git merge master &&
107
114
git rebase master &&
You can’t perform that action at this time.
0 commit comments