version: convert to parse-options
commitb48cbfc5e6112952bc3be4dea0208bc5e1f331eb
authorJeff King <peff@peff.net>
Tue, 30 May 2017 05:17:42 +0000 (30 01:17 -0400)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Jun 2017 02:43:33 +0000 (5 11:43 +0900)
tree7db0b1d288cf804cd2b67eca487c2bb94e1f8104
parent5a88f97cff0f269f8b2069b17c9da05ee66c98bb
version: convert to parse-options

The "git version" command didn't traditionally accept any
options, and in fact ignores any you give it. When we added
simple option parsing for "--build-options" in 6b9c38e14, we
didn't improve this; we just loop over the arguments and
pick out the one we recognize.

Instead, let's move to a real parsing loop, complain about
nonsense options, and recognize conventions like "-h".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
help.c