Merge branch 'cf/submodule-progress-dissociate'
authorJunio C Hamano <gitster@pobox.com>
Tue, 19 Jun 2018 16:26:59 +0000 (09:26 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 19 Jun 2018 16:26:59 +0000 (09:26 -0700)
* cf/submodule-progress-dissociate:
t7400: encapsulate setup code in test_expect_success

1  2 
t/t7400-submodule-basic.sh
index 2f532529b82a847f81d4bdda17f9f07c115c2d86,d501ab4b613cd351c15c07f7a4fec4c28f6c8981..812db137b8db2f6f8457ccb5d6ab27e0215dbe1a
@@@ -126,8 -126,10 +126,10 @@@ test_expect_success 'submodule add' 
        test_cmp empty untracked
  '
  
- test_create_repo parent &&
- test_commit -C parent one
+ test_expect_success 'setup parent and one repository' '
+       test_create_repo parent &&
+       test_commit -C parent one
+ '
  
  test_expect_success 'redirected submodule add does not show progress' '
        git -C addtest submodule add "file://$submodurl/parent" submod-redirected \
@@@ -837,21 -839,6 +839,21 @@@ test_expect_success 'moving the superpr
        )
  '
  
 +test_expect_success 'moving the submodule does not break the superproject' '
 +      (
 +              cd addtest2 &&
 +              git submodule status
 +      ) >actual &&
 +      sed -e "s/^ \([^ ]* repo\) .*/-\1/" <actual >expect &&
 +      mv addtest2/repo addtest2/repo.bak &&
 +      test_when_finished "mv addtest2/repo.bak addtest2/repo" &&
 +      (
 +              cd addtest2 &&
 +              git submodule status
 +      ) >actual &&
 +      test_cmp expect actual
 +'
 +
  test_expect_success 'submodule add --name allows to replace a submodule with another at the same path' '
        (
                cd addtest2 &&