Undef DT_* before redefining them.
[git.git] / t / t3401-rebase-partial.sh
blob32dc9c5e74e80e2483ae0bf49f3dfd549c6d8471
1 #!/bin/sh
3 # Copyright (c) 2006 Yann Dirson, based on t3400 by Amos Waterland
6 test_description='git rebase should detect patches integrated upstream
8 This test cherry-picks one local change of two into master branch, and
9 checks that git rebase succeeds with only the second patch in the
10 local branch.
12 . ./test-lib.sh
14 test_expect_success \
15 'prepare repository with topic branch' \
16 'echo First > A &&
17 git-update-index --add A &&
18 git-commit -m "Add A." &&
20 git-checkout -b my-topic-branch &&
22 echo Second > B &&
23 git-update-index --add B &&
24 git-commit -m "Add B." &&
26 echo AnotherSecond > C &&
27 git-update-index --add C &&
28 git-commit -m "Add C." &&
30 git-checkout -f master &&
32 echo Third >> A &&
33 git-update-index A &&
34 git-commit -m "Modify A."
37 test_expect_success \
38 'pick top patch from topic branch into master' \
39 'git-cherry-pick my-topic-branch^0 &&
40 git-checkout -f my-topic-branch
43 test_debug \
44 'git-cherry master &&
45 git-format-patch -k --stdout --full-index master >/dev/null &&
46 gitk --all & sleep 1
49 test_expect_success \
50 'rebase topic branch against new master and check git-am did not get halted' \
51 'git-rebase master && test ! -d .dotest'
53 test_done