test-lib: introduce the '-V' short option for '--verbose-log'
authorSZEDER Gábor <szeder.dev@gmail.com>
Mon, 29 Oct 2018 12:13:59 +0000 (13:13 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Oct 2018 02:06:54 +0000 (11:06 +0900)
'--verbose-log' is one of the most useful and thus most frequently
used test options, but due to its length it's a pain to type on the
command line.

Let's introduce the corresponding short option '-V' to save some
keystrokes.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/README
t/test-lib.sh
index 9028b47d923ca027a146da82060dae395d3f7999..0c31792d145817ec19d90325b80d7711ea3c11a4 100644 (file)
--- a/t/README
+++ b/t/README
@@ -154,6 +154,7 @@ appropriately before running "make".
        As the names depend on the tests' file names, it is safe to
        run the tests with this option in parallel.
 
+-V::
 --verbose-log::
        Write verbose output to the same logfile as `--tee`, but do
        _not_ write it to stdout. Unlike `--tee --verbose`, this option
index 44288cbb598435a5dfff05e8e895cca85e53e804..1373fd4592874237d3ee5575c0398a6f00b56369 100644 (file)
@@ -67,7 +67,7 @@ case "$GIT_TEST_TEE_STARTED, $* " in
 done,*)
        # do not redirect again
        ;;
-*' --tee '*|*' --va'*|*' --verbose-log '*)
+*' --tee '*|*' --va'*|*' -V '*|*' --verbose-log '*)
        mkdir -p "$TEST_OUTPUT_DIRECTORY/test-results"
        BASE="$TEST_OUTPUT_DIRECTORY/test-results/$(basename "$0" .sh)"
 
@@ -285,7 +285,7 @@ do
                        echo >&2 "warning: ignoring -x; '$0' is untraceable without BASH_XTRACEFD"
                fi
                shift ;;
-       --verbose-log)
+       -V|--verbose-log)
                verbose_log=t
                shift ;;
        *)