1#!/bin/sh2#3# Copyright (c) 2006 Yann Dirson, based on t3400 by Amos Waterland4#56test_description='git rebase should detect patches integrated upstream78This test cherry-picks one local change of two into master branch, and9checks that git rebase succeeds with only the second patch in the10local branch.11'12. ./test-lib.sh1314test_expect_success 'prepare repository with topic branch' '15test_commit A &&16git checkout -b my-topic-branch &&17test_commit B &&18test_commit C &&19git checkout -f master &&20test_commit A2 A.t21'2223test_expect_success 'pick top patch from topic branch into master' '24git cherry-pick C &&25git checkout -f my-topic-branch26'2728test_debug '29git cherry master &&30git format-patch -k --stdout --full-index master >/dev/null &&31gitk --all & sleep 132'3334test_expect_success 'rebase topic branch against new master and check git am did not get halted' '35git rebase master &&36test_path_is_missing .git/rebase-apply37'3839test_expect_success 'rebase --merge topic branch that was partially merged upstream' '40git reset --hard C &&41git rebase --merge master &&42test_path_is_missing .git/rebase-merge43'4445test_done