Merge branch 'sb/submodule-update-initial-runs-custom-script'
authorJunio C Hamano <gitster@pobox.com>
Mon, 27 Mar 2017 17:59:21 +0000 (10:59 -0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Mar 2017 17:59:22 +0000 (10:59 -0700)
A test fix.

* sb/submodule-update-initial-runs-custom-script:
t7406: correct test case for submodule-update initial population

1  2 
t/t7406-submodule-update.sh
index 347857fa7c7cb12a4bc9fd6a2f5373347a02db5c,a70fe96ad6ec8b0932e37186b3556b8d4eb28bc8..4ac386d98b8ebdfb4808b9a8119900ee23b5dfa9
@@@ -140,23 -140,6 +140,23 @@@ test_expect_success 'submodule update -
        test_i18ncmp expect2 actual2
  '
  
 +cat <<EOF >expect2
 +Submodule 'foo/sub' ($pwd/withsubs/../rebasing) registered for path 'sub'
 +EOF
 +
 +test_expect_success 'submodule update --init from and of subdirectory' '
 +      git init withsubs &&
 +      (cd withsubs &&
 +       mkdir foo &&
 +       git submodule add "$(pwd)/../rebasing" foo/sub &&
 +       (cd foo &&
 +        git submodule deinit -f sub &&
 +        git submodule update --init sub 2>../../actual2
 +       )
 +      ) &&
 +      test_i18ncmp expect2 actual2
 +'
 +
  apos="'";
  test_expect_success 'submodule update does not fetch already present commits' '
        (cd submodule &&
@@@ -442,11 -425,11 +442,11 @@@ test_expect_success 'submodule update 
  '
  
  test_expect_success 'submodule update - command run for initial population of submodule' '
-       cat <<-\ EOF >expect
+       cat >expect <<-EOF &&
        Execution of '\''false $submodulesha1'\'' failed in submodule path '\''submodule'\''
-       EOF &&
+       EOF
        rm -rf super/submodule &&
-       test_must_fail git -C super submodule update >../actual &&
+       test_must_fail git -C super submodule update 2>actual &&
        test_cmp expect actual &&
        git -C super submodule update --checkout
  '