usage: add -b, sort flag in parsing code - stagit-gopher - A git gopher frontend. (mirror)
git clone git://bitreich.org/stagit-gopher/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/stagit-gopher/
Log
Files
Refs
Tags
README
LICENSE
---
commit bdb40a1c6bacf3955f49c6054504fb7f5a93c8fd
parent 3b896a837b77b7956e233e4904d9bda11f0837e2
Author: Hiltjo Posthuma 
Date:   Fri, 23 Jun 2017 12:35:49 +0200

usage: add -b, sort flag in parsing code

Diffstat:
  M stagit-gopher.c                     |      10 +++++-----

1 file changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/stagit-gopher.c b/stagit-gopher.c
@@ -1060,7 +1060,7 @@ err:
 void
 usage(char *argv0)
 {
-        fprintf(stderr, "%s [-c cachefile] repodir\n", argv0);
+        fprintf(stderr, "%s [-b baseprefix] [-c cachefile] repodir\n", argv0);
         exit(1);
 }
 
@@ -1084,14 +1084,14 @@ main(int argc, char *argv[])
                         if (repodir)
                                 usage(argv[0]);
                         repodir = argv[i];
-                } else if (argv[i][1] == 'c') {
-                        if (i + 1 >= argc)
-                                usage(argv[0]);
-                        cachefile = argv[++i];
                 } else if (argv[i][1] == 'b') {
                         if (i + 1 >= argc)
                                 usage(argv[0]);
                         relpath = argv[++i];
+                } else if (argv[i][1] == 'c') {
+                        if (i + 1 >= argc)
+                                usage(argv[0]);
+                        cachefile = argv[++i];
                 }
         }
         if (!repodir)