summaryrefslogtreecommitdiff
path: root/quote.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-05-06 20:58:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2011-05-06 21:42:06 (GMT)
commit73151df0cf3b324fc5f8980774601794c4b88204 (patch)
tree6eca5f8a73a230d2492308e4fbed7225d293f7e1 /quote.c
parentec014eac0e9e6f30cbbca616090fa2ecf74797e7 (diff)
downloadgit-73151df0cf3b324fc5f8980774601794c4b88204.zip
git-73151df0cf3b324fc5f8980774601794c4b88204.tar.gz
git-73151df0cf3b324fc5f8980774601794c4b88204.tar.bz2
tests: eliminate unnecessary setup test assertions
Most of git's tests write files and define shell functions and variables that will last throughout a test script at the top of the script, before all test assertions: . ./test-lib.sh VAR='some value' export VAR >empty fn () { do something } test_expect_success 'setup' ' ... nontrivial commands go here ... ' Two scripts use a different style with this kind of trivial code enclosed by a test assertion; fix them. The usual style is easier to read since there is less indentation to keep track of and no need to worry about nested quotes; and on the other hand, because the commands in question are trivial, it should not make the test suite any worse at catching future bugs in git. While at it, make some other small tweaks: - spell function definitions with a space before () for consistency with other scripts; - use the self-contained command "git mktree </dev/null" in preference to "git write-tree" which looks at the index when writing an empty tree. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'quote.c')
0 files changed, 0 insertions, 0 deletions