From: Jonas Fonseca Date: Mon, 18 Sep 2006 15:33:28 +0000 (+0200) Subject: Oops, check log, diff, and show before options X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=3621d94edb435e4a3c66da7ff192f01bf811865b;p=tig.git Oops, check log, diff, and show before options Fixes 8d27b36ea5e4e2f282d6e080b9bc0c134d29257a. --- diff --git a/tig.c b/tig.c index 1f92114..471fa4d 100644 --- a/tig.c +++ b/tig.c @@ -451,6 +451,14 @@ parse_options(int argc, char *argv[]) for (i = 1; i < argc; i++) { char *opt = argv[i]; + if (!strcmp(opt, "log") || + !strcmp(opt, "diff") || + !strcmp(opt, "show")) { + opt_request = opt[0] == 'l' + ? REQ_VIEW_LOG : REQ_VIEW_DIFF; + break; + } + if (opt[0] && opt[0] != '-') break; @@ -489,14 +497,6 @@ parse_options(int argc, char *argv[]) break; } - if (!strcmp(opt, "log") || - !strcmp(opt, "diff") || - !strcmp(opt, "show")) { - opt_request = opt[0] == 'l' - ? REQ_VIEW_LOG : REQ_VIEW_DIFF; - break; - } - die("unknown option '%s'\n\n%s", opt, usage); }