if (opt[0] && opt[0] != '-')
break;
+ if (!strcmp(opt, "--")) {
+ i++;
+ break;
+ }
+
+ if (check_option(opt, 'v', "version", OPT_NONE)) {
+ printf("tig version %s\n", TIG_VERSION);
+ return FALSE;
+ }
+
+ if (check_option(opt, 'h', "help", OPT_NONE)) {
+ printf(usage);
+ return FALSE;
+ }
+
+ if (!strcmp(opt, "-S")) {
+ opt_request = REQ_VIEW_STATUS;
+ continue;
+ }
+
if (!strcmp(opt, "-l")) {
opt_request = REQ_VIEW_LOG;
continue;
continue;
}
- if (!strcmp(opt, "-S")) {
- opt_request = REQ_VIEW_STATUS;
- continue;
- }
-
if (check_option(opt, 'n', "line-number", OPT_INT, &opt_num_interval)) {
opt_line_number = TRUE;
continue;
continue;
}
- if (check_option(opt, 'v', "version", OPT_NONE)) {
- printf("tig version %s\n", TIG_VERSION);
- return FALSE;
- }
-
- if (check_option(opt, 'h', "help", OPT_NONE)) {
- printf(usage);
- return FALSE;
- }
-
- if (!strcmp(opt, "--")) {
- i++;
- break;
- }
-
die("unknown option '%s'\n\n%s", opt, usage);
}