ctucx.git: stagit

ctucx' stagit fork

commit 7a812ea9c3fb3ad923ddc96b85acc4e4595d6db5
parent 3ef3c3634d9b3349a0aceee382526df414514966
Author: Leah (ctucx) <leah@ctu.cx>
Date: Thu, 26 May 2022 18:02:52 +0200

stagit-index: add option '-e <value>' to store an email-address
1 file changed, 8 insertions(+), 0 deletions(-)
M
stagit-index.c
|
8
++++++++
diff --git a/stagit-index.c b/stagit-index.c
@@ -14,6 +14,7 @@ static const char *relpath = "";
 
 static char description[255] = "Oscar Benedito's Git repositories";
 static char *pagename = "";
+static char *email = "";
 static char *name = "";
 static char owner[255];
 static char category[255];

@@ -210,6 +211,13 @@ main(int argc, char *argv[])
 			continue;
 		}
 
+		if (!strcmp(argv[i], "-e")) {
+			i++;
+			if (i == argc) err(1, "missing argument");
+			email = argv[i];
+			continue;
+		}
+
 		if (!strcmp(argv[i], "-c")) {
 			i++;
 			if (i == argc)