commit 4f961cf4859154f0570abe0406c223171d8a9ac2
parent 91ff2dc29c267e38d2fe0d515f4761e47059aeae
Author: 5hif7y <[email protected]>
Date: Fri, 25 Apr 2025 04:40:23 -0300
Add warnings for missing repository description and owner
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/stagit-index.c b/stagit-index.c
@@ -233,6 +233,8 @@ main(int argc, char *argv[])
checkfileerror(fp, "description", 'r');
fclose(fp);
}
+ if (description[0] == '\0' || strcmp(description, "Unnamed repository; edit this file 'description' to name the repository.\n") == 0)
+ fprintf(stderr, "Warning: repository '%s' has no valid description.\n", repodir);
/* read owner or .git/owner */
joinpath(path, sizeof(path), repodir, "owner");
@@ -248,6 +250,9 @@ main(int argc, char *argv[])
fclose(fp);
owner[strcspn(owner, "\n")] = '\0';
}
+ if (owner[0] == '\0')
+ fprintf(stderr, "Warning: repository '%s' has no owner set.\n", repodir);
+
writelog(stdout);
}
writefooter(stdout);