From 8d27b36ea5e4e2f282d6e080b9bc0c134d29257a Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Mon, 18 Sep 2006 00:57:30 +0200 Subject: [PATCH] parse_option: check for '-' first and break if it is not an option --- tig.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); } -- 2.30.2