]> git.ipfire.org Git - thirdparty/git.git/commit
fast-import: tighten parsing of boolean command line options
authorJeff King <peff@peff.net>
Thu, 29 Aug 2019 15:25:45 +0000 (11:25 -0400)
committerJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 4 Dec 2019 12:20:04 +0000 (13:20 +0100)
commit11e934d56e46875b24d8a047d44b45ff243f6715
tree2e5e57ac730e9a0e75ec8b749a5151214ba04208
parent816f806786e12435163c591942a204c5a3bdd795
fast-import: tighten parsing of boolean command line options

We parse options like "--max-pack-size=" using skip_prefix(), which
makes sense to get at the bytes after the "=". However, we also parse
"--quiet" and "--stats" with skip_prefix(), which allows things like
"--quiet-nonsense" to behave like "--quiet".

This was a mistaken conversion in 0f6927c229 (fast-import: put option
parsing code in separate functions, 2009-12-04). Let's tighten this to
an exact match, which was the original intent.

Signed-off-by: Jeff King <peff@peff.net>
fast-import.c