author | René Scharfe <rene.scharfe@lsrfire.ath.cx> | |
Sat, 3 Mar 2012 11:00:29 +0000 (12:00 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 Mar 2012 02:28:59 +0000 (18:28 -0800) | ||
commit | 38916c5b4740f6db09dc140a84bb470dfb582366 | |
tree | 72051a87034959717d84c8f209dd3ee725fcead1 | tree | snapshot |
parent | b22939a2860604bec718cfd751e930f3a8afd1cc | commit | diff |
parse-options: typo check for unknown switches
The user specifies a long option but forgets to type the second
leading dash, we currently detect and report that fact if its first
letter is a valid short option. This is done for safety, to avoid
ambiguity between short options (and their arguments) and a long
option with a missing dash.
This diagnostic message is also helpful for long options whose first
letter is not a valid short option, however. Print it in that case,
too, as a courtesy.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The user specifies a long option but forgets to type the second
leading dash, we currently detect and report that fact if its first
letter is a valid short option. This is done for safety, to avoid
ambiguity between short options (and their arguments) and a long
option with a missing dash.
This diagnostic message is also helpful for long options whose first
letter is not a valid short option, however. Print it in that case,
too, as a courtesy.
Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.c | diff | blob | history | |
t/t0040-parse-options.sh | diff | blob | history |