Merge branch 'sb/submodule-module-list-pathspec-fix'
authorJunio C Hamano <gitster@pobox.com>
Fri, 13 May 2016 20:18:28 +0000 (13:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 13 May 2016 20:18:28 +0000 (13:18 -0700)
* sb/submodule-module-list-pathspec-fix:
submodule deinit test: fix broken && chain in subshell

1  2 
t/t7400-submodule-basic.sh
index f99f674ac795b7b55c5fc678257bd7365c71e62d,cf06b2f8c31cfe829805cf7311bb96bd8f08a1f8..d48d63a6fd0d3f4480d3b42ae146326e7b11a56a
@@@ -462,7 -462,7 +462,7 @@@ test_expect_success 'update --init' 
        git config --remove-section submodule.example &&
        test_must_fail git config submodule.example.url &&
  
 -      git submodule update init > update.out &&
 +      git submodule update init 2> update.out &&
        cat update.out &&
        test_i18ngrep "not initialized" update.out &&
        test_must_fail git rev-parse --resolve-git-dir init/.git &&
@@@ -480,7 -480,7 +480,7 @@@ test_expect_success 'update --init fro
        mkdir -p sub &&
        (
                cd sub &&
 -              git submodule update ../init >update.out &&
 +              git submodule update ../init 2>update.out &&
                cat update.out &&
                test_i18ngrep "not initialized" update.out &&
                test_must_fail git rev-parse --resolve-git-dir ../init/.git &&
@@@ -818,47 -818,6 +818,47 @@@ test_expect_success 'submodule add --na
        )
  '
  
 +test_expect_success 'recursive relative submodules stay relative' '
 +      test_when_finished "rm -rf super clone2 subsub sub3" &&
 +      mkdir subsub &&
 +      (
 +              cd subsub &&
 +              git init &&
 +              >t &&
 +              git add t &&
 +              git commit -m "initial commit"
 +      ) &&
 +      mkdir sub3 &&
 +      (
 +              cd sub3 &&
 +              git init &&
 +              >t &&
 +              git add t &&
 +              git commit -m "initial commit" &&
 +              git submodule add ../subsub dirdir/subsub &&
 +              git commit -m "add submodule subsub"
 +      ) &&
 +      mkdir super &&
 +      (
 +              cd super &&
 +              git init &&
 +              >t &&
 +              git add t &&
 +              git commit -m "initial commit" &&
 +              git submodule add ../sub3 &&
 +              git commit -m "add submodule sub"
 +      ) &&
 +      git clone super clone2 &&
 +      (
 +              cd clone2 &&
 +              git submodule update --init --recursive &&
 +              echo "gitdir: ../.git/modules/sub3" >./sub3/.git_expect &&
 +              echo "gitdir: ../../../.git/modules/sub3/modules/dirdir/subsub" >./sub3/dirdir/subsub/.git_expect
 +      ) &&
 +      test_cmp clone2/sub3/.git_expect clone2/sub3/.git &&
 +      test_cmp clone2/sub3/dirdir/subsub/.git_expect clone2/sub3/dirdir/subsub/.git
 +'
 +
  test_expect_success 'submodule add with an existing name fails unless forced' '
        (
                cd addtest2 &&
@@@ -898,7 -857,7 +898,7 @@@ test_expect_success 'submodule deinit w
                git init &&
                >file &&
                git add file &&
-               git commit -m "repo should not be empty"
+               git commit -m "repo should not be empty" &&
                git submodule deinit .
        )
  '