about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--cgit.c29
1 files changed, 10 insertions, 19 deletions
diff --git a/cgit.c b/cgit.c
index e31962d..f4262d8 100644
--- a/cgit.c
+++ b/cgit.c
@@ -865,35 +865,26 @@ static void cgit_parse_args(int argc, const char **argv)
 	for (i = 1; i < argc; i++) {
 		if (!prefixcmp(argv[i], "--cache=")) {
 			ctx.cfg.cache_root = xstrdup(argv[i] + 8);
-		}
-		if (!strcmp(argv[i], "--nocache")) {
+		} else if (!strcmp(argv[i], "--nocache")) {
 			ctx.cfg.nocache = 1;
-		}
-		if (!strcmp(argv[i], "--nohttp")) {
+		} else if (!strcmp(argv[i], "--nohttp")) {
 			ctx.env.no_http = "1";
-		}
-		if (!prefixcmp(argv[i], "--query=")) {
+		} else if (!prefixcmp(argv[i], "--query=")) {
 			ctx.qry.raw = xstrdup(argv[i] + 8);
-		}
-		if (!prefixcmp(argv[i], "--repo=")) {
+		} else if (!prefixcmp(argv[i], "--repo=")) {
 			ctx.qry.repo = xstrdup(argv[i] + 7);
-		}
-		if (!prefixcmp(argv[i], "--page=")) {
+		} else if (!prefixcmp(argv[i], "--page=")) {
 			ctx.qry.page = xstrdup(argv[i] + 7);
-		}
-		if (!prefixcmp(argv[i], "--head=")) {
+		} else if (!prefixcmp(argv[i], "--head=")) {
 			ctx.qry.head = xstrdup(argv[i] + 7);
 			ctx.qry.has_symref = 1;
-		}
-		if (!prefixcmp(argv[i], "--sha1=")) {
+		} else if (!prefixcmp(argv[i], "--sha1=")) {
 			ctx.qry.sha1 = xstrdup(argv[i] + 7);
 			ctx.qry.has_sha1 = 1;
-		}
-		if (!prefixcmp(argv[i], "--ofs=")) {
+		} else if (!prefixcmp(argv[i], "--ofs=")) {
 			ctx.qry.ofs = atoi(argv[i] + 6);
-		}
-		if (!prefixcmp(argv[i], "--scan-tree=") ||
-		    !prefixcmp(argv[i], "--scan-path=")) {
+		} else if (!prefixcmp(argv[i], "--scan-tree=") ||
+		           !prefixcmp(argv[i], "--scan-path=")) {
 			/* HACK: the global snapshot bitmask defines the
 			 * set of allowed snapshot formats, but the config
 			 * file hasn't been parsed yet so the mask is
d67d9b6a55a0308d00ceb&follow=1'>Add Normal PeopleJune McEnroe 2022-07-26Rewrite glitch from new pngoJune McEnroe 2022-07-26Update Care with time-to-ID and piercingsJune McEnroe 2022-07-26Add -w to upJune McEnroe 2022-07-13Set push.autoSetupRemoteJune McEnroe 2022-07-08Remove TOURJune McEnroe 2022-07-03Add The Bone Shard EmperorJune McEnroe 2022-06-25Bump xterm font size to 12June McEnroe 2022-06-10Handle subshells (and functions) inside substitutionsJune McEnroe 2022-06-10Switch to jorts Install scriptJune McEnroe 2022-06-08Indicate if still reading or no resultsJune McEnroe 2022-06-08Add Maiden, Mother, CroneJune McEnroe 2022-06-05FIRST SHOW IN 2.5 YEARS BABEY!!!June McEnroe 2022-06-03Set line number on File linesJune McEnroe 2022-06-03Stop polling stdin after EOFJune McEnroe 2022-06-02Set TABSIZE=4June McEnroe 2022-06-02Do basic match highlightingJune McEnroe 2022-06-02Clean up parsing a littleJune McEnroe 2022-06-02Don't duplicate path stringJune McEnroe 2022-06-02Use stderr instead of /dev/tty, realloc buffer if lines too longJune McEnroe 2022-06-02Add initial working version of qfJune McEnroe 2022-05-29Set prompt for okshJune McEnroe