Merge branch 'jk/pull-rebase-using-fork-point'
Finishing touches. * jk/pull-rebase-using-fork-point: rebase: fix fork-point with zero arguments
This commit is contained in:
commit
5e72e7168c
@ -534,7 +534,8 @@ esac
|
|||||||
|
|
||||||
if test "$fork_point" = t
|
if test "$fork_point" = t
|
||||||
then
|
then
|
||||||
new_upstream=$(git merge-base --fork-point "$upstream_name" "$switch_to")
|
new_upstream=$(git merge-base --fork-point "$upstream_name" \
|
||||||
|
"${switch_to:-HEAD}")
|
||||||
if test -n "$new_upstream"
|
if test -n "$new_upstream"
|
||||||
then
|
then
|
||||||
upstream=$new_upstream
|
upstream=$new_upstream
|
||||||
|
@ -135,11 +135,19 @@ test_expect_success 'fail when upstream arg is missing and not configured' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' '
|
test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' '
|
||||||
|
git checkout -b default-base master &&
|
||||||
git checkout -b default topic &&
|
git checkout -b default topic &&
|
||||||
git config branch.default.remote . &&
|
git config branch.default.remote . &&
|
||||||
git config branch.default.merge refs/heads/master &&
|
git config branch.default.merge refs/heads/default-base &&
|
||||||
git rebase &&
|
git rebase &&
|
||||||
git rev-parse --verify master >expect &&
|
git rev-parse --verify default-base >expect &&
|
||||||
|
git rev-parse default~1 >actual &&
|
||||||
|
test_cmp expect actual &&
|
||||||
|
git checkout default-base &&
|
||||||
|
git reset --hard HEAD^ &&
|
||||||
|
git checkout default &&
|
||||||
|
git rebase &&
|
||||||
|
git rev-parse --verify default-base >expect &&
|
||||||
git rev-parse default~1 >actual &&
|
git rev-parse default~1 >actual &&
|
||||||
test_cmp expect actual
|
test_cmp expect actual
|
||||||
'
|
'
|
||||||
|
Loading…
Reference in New Issue
Block a user