ctucx.git: stagit

ctucx' stagit fork

commit 9f9634f97515dbd4b94a3cb84c2e020ed6027e7f
parent a7d019f9a7d530d10344e7adc3883af45b2c651b
Author: Leah (ctucx) <leah@ctu.cx>
Date: Tue, 24 May 2022 14:57:27 +0200

implement option '-s <value>' to store a ssh cloneurl
1 file changed, 4 insertions(+), 1 deletion(-)
M
stagit.c
|
5
++++-
diff --git a/stagit.c b/stagit.c
@@ -66,6 +66,7 @@ static const char *repodir;
 
 static char *pagename = "";
 static char *http_cloneurl = "";
+static char *ssh_cloneurl = "";
 
 static char *gen_time;
 static char *name = "";

@@ -1253,7 +1254,7 @@ writerefs(FILE *fp)
 void
 usage(char *argv0)
 {
-	fprintf(stderr, "%s [-c cachefile | -l commits | -n pagename | -h http_cloneurl ]"
+	fprintf(stderr, "%s [-c cachefile | -l commits | -n pagename | -h http_cloneurl | -s ssh_cloneurl ]"
 	        " repodir\n", argv0);
 	exit(1);
 }

@@ -1306,6 +1307,8 @@ main(int argc, char *argv[])
 			pagename = argv[++i];
 		} else if (argv[i][1] == 'h') {
 			http_cloneurl = argv[++i];
+		} else if (argv[i][1] == 's') {
+			ssh_cloneurl = argv[++i];
 		}
 	}
 	if (!repodir)