X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft7401-submodule-summary.sh;h=294584452bbc3226e631ce0b81c546b04cd8d992;hb=bc979945305b87caf1e5975d30d42bafd88ad846;hp=d3c039f724c3a1247417b5fd29d6bd50a88f54be;hpb=c512b035556eff4d8f869afeda5fd78bc7a4966d;p=git.git diff --git a/t/t7401-submodule-summary.sh b/t/t7401-submodule-summary.sh index d3c039f72..294584452 100755 --- a/t/t7401-submodule-summary.sh +++ b/t/t7401-submodule-summary.sh @@ -66,10 +66,11 @@ EOF " commit_file sm1 && -cd sm1 && -git reset --hard HEAD~2 >/dev/null && -head3=$(git rev-parse --verify HEAD | cut -c1-7) && -cd .. +head3=$( + cd sm1 && + git reset --hard HEAD~2 >/dev/null && + git rev-parse --verify HEAD | cut -c1-7 +) test_expect_success 'modified submodule(backward)' " git submodule summary >actual && @@ -227,4 +228,11 @@ test_expect_success 'fail when using --files together with --cached' " test_must_fail git submodule summary --files --cached " +test_expect_success 'should not fail in an empty repo' " + git init xyzzy && + cd xyzzy && + git submodule summary >output 2>&1 && + test_cmp output /dev/null +" + test_done