summaryrefslogtreecommitdiff
path: root/builtin/commit-tree.c
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2019-01-05 02:08:54 +0100
committerJunio C Hamano <gitster@pobox.com>2019-01-07 09:24:05 -0800
commita9b2db379b3be3dcb7540e04f10a1d67c3bc974f (patch)
treed86808e7275f19a8d1ff95ab2231fbe92cd0061a /builtin/commit-tree.c
parent0a97e86e9a28746604f38eacb11119aadbadb9c8 (diff)
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 'builtin/commit-tree.c')
0 files changed, 0 insertions, 0 deletions