diff options
author | Junio C Hamano <gitster@pobox.com> | 2016-04-22 15:45:09 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-04-22 15:45:09 -0700 |
commit | 2416803b6cea2bc56ea29fe767a916572f2fc89e (patch) | |
tree | c545e8745088029c1e93f7df9f2e339e5892506c /t/t1020-subdirectory.sh | |
parent | fd9b37cfde7f0e109592da41a784291c7eb8cb94 (diff) | |
parent | 7bec7f50ae10ce760160ed4d11e47cd0494cb8d7 (diff) | |
download | git-2416803b6cea2bc56ea29fe767a916572f2fc89e.tar.gz git-2416803b6cea2bc56ea29fe767a916572f2fc89e.tar.xz |
Merge branch 'jk/use-write-script-more'
Code clean-up.
* jk/use-write-script-more:
t3404: use write_script
t1020: do not overuse printf and use write_script
t5532: use write_script
Diffstat (limited to 't/t1020-subdirectory.sh')
-rwxr-xr-x | t/t1020-subdirectory.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/t/t1020-subdirectory.sh b/t/t1020-subdirectory.sh index 8e22b03cd..df3183ea1 100755 --- a/t/t1020-subdirectory.sh +++ b/t/t1020-subdirectory.sh @@ -141,13 +141,13 @@ test_expect_success 'GIT_PREFIX for !alias' ' test_expect_success 'GIT_PREFIX for built-ins' ' # Use GIT_EXTERNAL_DIFF to test that the "diff" built-in # receives the GIT_PREFIX variable. - printf "dir/" >expect && - printf "#!/bin/sh\n" >diff && - printf "printf \"\$GIT_PREFIX\"" >>diff && - chmod +x diff && + echo "dir/" >expect && + write_script diff <<-\EOF && + printf "%s\n" "$GIT_PREFIX" + EOF ( cd dir && - printf "change" >two && + echo "change" >two && GIT_EXTERNAL_DIFF=./diff git diff >../actual git checkout -- two ) && |