> diff --git a/t/t7400-submodule-basic.sh b/t/t7400-submodule-basic.sh > index a924fdb7a6..f5dc051a6e 100755 > --- a/t/t7400-submodule-basic.sh > +++ b/t/t7400-submodule-basic.sh > @@ -107,25 +107,18 @@ test_expect_success 'setup - repository to add submodules to' ' > # generates, which will expand symbolic links. > submodurl=$(pwd -P) > > -listbranches() { > - git for-each-ref --format='%(refname)' 'refs/heads/*' > -} > - > inspect() { > dir=$1 && > - dotdot="${2:-..}" && > > - ( > - cd "$dir" && > - listbranches >"$dotdot/heads" && > - { git symbolic-ref HEAD || :; } >"$dotdot/head" && > - git rev-parse HEAD >"$dotdot/head-sha1" && > - git update-index --refresh && > - git diff-files --exit-code && > - git clean -n -d -x >"$dotdot/untracked" > - ) > + git -C "$dir" for-each-ref --format='%(refname)' 'refs/heads/*' >heads && > + { git -C "$dir" symbolic-ref HEAD || :; } >head && > + git -C "$dir" rev-parse HEAD >head-sha1 && > + git -C "$dir" update-index --refresh && > + git -C "$dir" diff-files --exit-code && > + git -C "$dir" clean -n -d -x >untracked > } > > + Stray extra line. Other than that, this is definitely a good simplification.