Interested in helping open source friends on HP-UX?
[git/mjg.git] / t / t5572-pull-submodule.sh
blobaccfa5cc0cd35c8e609e20928ad947b62ae3108b
1 #!/bin/sh
3 test_description='pull can handle submodules'
5 . ./test-lib.sh
6 . "$TEST_DIRECTORY"/lib-submodule-update.sh
8 reset_branch_to_HEAD () {
9 git branch -D "$1" &&
10 git checkout -b "$1" HEAD &&
11 git branch --set-upstream-to="origin/$1" "$1"
14 git_pull () {
15 reset_branch_to_HEAD "$1" &&
16 git pull
19 # pulls without conflicts
20 test_submodule_switch "git_pull"
22 git_pull_ff () {
23 reset_branch_to_HEAD "$1" &&
24 git pull --ff
27 test_submodule_switch "git_pull_ff"
29 git_pull_ff_only () {
30 reset_branch_to_HEAD "$1" &&
31 git pull --ff-only
34 test_submodule_switch "git_pull_ff_only"
36 git_pull_noff () {
37 reset_branch_to_HEAD "$1" &&
38 git pull --no-ff
41 KNOWN_FAILURE_NOFF_MERGE_DOESNT_CREATE_EMPTY_SUBMODULE_DIR=1
42 KNOWN_FAILURE_NOFF_MERGE_ATTEMPTS_TO_MERGE_REMOVED_SUBMODULE_FILES=1
43 test_submodule_switch "git_pull_noff"
45 test_done