summaryrefslogtreecommitdiff
path: root/trailer.c
diff options
context:
space:
mode:
authorLibravatar Martin Ågren <martin.agren@gmail.com>2020-08-06 22:08:54 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-08-06 15:14:34 -0700
commit289218de2b5cc17e88d7a04f46fc8302142da8d0 (patch)
treeba954fb045b82c7a991a1e1ec63dd03d5d64e459 /trailer.c
parentt: don't spuriously close and reopen quotes (diff)
downloadtgif-289218de2b5cc17e88d7a04f46fc8302142da8d0.tar.xz
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 'trailer.c')
0 files changed, 0 insertions, 0 deletions