summaryrefslogtreecommitdiff
path: root/t/t4200-rerere.sh
diff options
context:
space:
mode:
authorMartin Ågren <martin.agren@gmail.com>2020-08-06 20:08:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-08-06 22:14:34 (GMT)
commit289218de2b5cc17e88d7a04f46fc8302142da8d0 (patch)
treeba954fb045b82c7a991a1e1ec63dd03d5d64e459 /t/t4200-rerere.sh
parentc76b84a12160476fa795831ef3c2236e68c24f36 (diff)
downloadgit-289218de2b5cc17e88d7a04f46fc8302142da8d0.zip
git-289218de2b5cc17e88d7a04f46fc8302142da8d0.tar.gz
git-289218de2b5cc17e88d7a04f46fc8302142da8d0.tar.bz2
t4104: modernize and simplify quoting
Drop whitespace in the value of `$test_description` and in a test body and use `test_write_lines`. Stop defining `$u` with a trailing space just so that we can tuck it in like `git foo $u$more...` and get minimal whitespace in the command: `git foo $u $more...` is more readable at the "cost" of an empty `$u` yielding `git foo something...`. Finally, avoid using single quotes within the test scripts to repeatedly close and reopen the quotes that wrap the test scripts (see the previous commit). This "unnecessary" quoting does mean that the verbose test output shows the interpolated values, i.e., the shell code we're running. But the downside is that the source of the script does *not* show the shell code we're eventually executing, leaving the reader to reason about what we really do and whether there are any quoting issues. (There aren't.) Where we run through loops to generate several "identical but different" tests, the test message contains the interpolated variables we're looping on, meaning one can always identify exactly which instance has failed, even if the verbose test output shows the exact same test body several times. Signed-off-by: Martin Ågren <martin.agren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4200-rerere.sh')
0 files changed, 0 insertions, 0 deletions