diff options
author | SZEDER Gábor <szeder.dev@gmail.com> | 2017-06-09 20:17:31 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-06-12 13:39:46 -0700 |
commit | dffc651ed191ff0eb3cfd0e8df83a423b4dae994 (patch) | |
tree | 6a75b5f519418aed944883b558b0cba8f75d58f3 /kwset.c | |
parent | revision.c: stricter parsing of '--no-{min,max}-parents' (diff) | |
download | tgif-dffc651ed191ff0eb3cfd0e8df83a423b4dae994.tar.xz |
revision.c: stricter parsing of '--early-output'
The parsing of '--early-output' with or without its optional integer
argument allowed bogus options like '--early-output-foobarbaz' to slip
through and be ignored.
Fix it by parsing '--early-output' in the same way as other options
with an optional argument are parsed. Furthermore, use strtoul_ui()
to parse the optional integer argument and to refuse negative numbers.
While at it, use skip_prefix() instead of starts_with() and magic
numbers.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Reviewed-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'kwset.c')
0 files changed, 0 insertions, 0 deletions