From: Jonas Fonseca Date: Sun, 17 Sep 2006 22:57:30 +0000 (+0200) Subject: parse_option: check for '-' first and break if it is not an option X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=8d27b36ea5e4e2f282d6e080b9bc0c134d29257a;p=tig.git parse_option: check for '-' first and break if it is not an option --- diff --git a/tig.c b/tig.c index 7511353..18b4488 100644 --- a/tig.c +++ b/tig.c @@ -451,6 +451,9 @@ parse_options(int argc, char *argv[]) for (i = 1; i < argc; i++) { char *opt = argv[i]; + if (opt[0] && opt[0] != '-') + break; + if (!strcmp(opt, "-l")) { opt_request = REQ_VIEW_LOG; continue; @@ -494,9 +497,6 @@ parse_options(int argc, char *argv[]) break; } - if (opt[0] && opt[0] != '-') - break; - die("unknown option '%s'\n\n%s", opt, usage); }