diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2019-01-05 02:08:54 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-01-07 09:24:05 -0800 |
commit | a9b2db379b3be3dcb7540e04f10a1d67c3bc974f (patch) | |
tree | d86808e7275f19a8d1ff95ab2231fbe92cd0061a /Documentation/gitglossary.txt | |
parent | test-lib: extract Bash version check for '-x' tracing (diff) | |
download | tgif-a9b2db379b3be3dcb7540e04f10a1d67c3bc974f.tar.xz |
test-lib: parse options in a for loop to keep $@ intact
'test-lib.sh' looks for the presence of certain options like '--tee'
and '--verbose-log', so it can execute the test script again to save
its standard output and error, and to do so it needs the original
command line options the test was invoked with.
The next patch is about to move the option parsing loop earlier in
'test-lib.sh', but it is implemented using 'shift' in a while loop,
effecively destroying "$@" by the end of the option parsing. Not
good.
As a preparatory step, turn that option parsing loop into a 'for opt
in "$@"' loop to preserve "$@" intact while iterating over the
options, and taking extra care to handle the '-r' option's required
argument (or the lack thereof).
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/gitglossary.txt')
0 files changed, 0 insertions, 0 deletions