SITES: Point to pasky's git proxy repo.or.cz
[tig] / tig.c
diff --git a/tig.c b/tig.c
index 1f92114..f5f536c 100644 (file)
--- 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);
        }
 
@@ -3269,12 +3269,12 @@ read_prompt(const char *prompt)
                }
        }
 
-       if (status == CANCEL) {
-               /* Clear the status window */
-               status_empty = FALSE;
-               report("");
+       /* Clear the status window */
+       status_empty = FALSE;
+       report("");
+
+       if (status == CANCEL)
                return NULL;
-       }
 
        buf[pos++] = 0;