]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'sv/t7001-modernize'
authorJunio C Hamano <gitster@pobox.com>
Mon, 1 Mar 2021 22:02:57 +0000 (14:02 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 1 Mar 2021 22:02:57 +0000 (14:02 -0800)
Test script modernization.

* sv/t7001-modernize:
  t7001: use `test` rather than `[`
  t7001: use here-docs instead of echo
  t7001: put each command on a separate line
  t7001: use '>' rather than 'touch'
  t7001: avoid using `cd` outside of subshells
  t7001: remove whitespace after redirect operators
  t7001: modernize subshell formatting
  t7001: remove unnecessary blank lines
  t7001: indent with TABs instead of spaces
  t7001: modernize test formatting

1  2 
t/t7001-mv.sh

diff --cc t/t7001-mv.sh
index 080a65308316b1f03ba57e9bbcc34cb3feb504a9,63d779d88620530a175ef6ee75c2bc4e255f762e..25bb9bbb89994a1cb850b349342cef322c864b65
@@@ -446,13 -425,10 +425,10 @@@ test_expect_success 'mv issues a warnin
        echo "warning: Could not find section in .gitmodules where path=sub" >expect.err &&
        mkdir mod &&
        git mv sub mod/sub 2>actual.err &&
 -      test_i18ncmp expect.err actual.err &&
 +      test_cmp expect.err actual.err &&
        ! test -e sub &&
-       [ "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" ] &&
-       (
-               cd mod/sub &&
-               git status
-       ) &&
+       test "$entry" = "$(git ls-files --stage mod/sub | cut -f 1)" &&
+       git -C mod/sub status &&
        git update-index --refresh &&
        git diff-files --quiet
  '