Introduction
Introduction Statistics Contact Development Disclaimer Help
prefix usage with the common prefix "usage: " - stagit-gopher - static git page…
git clone git://git.codemadness.org/stagit-gopher
Log
Files
Refs
README
LICENSE
---
commit d8c4c2c3aa23b1237f15fc3ab539419c2368989e
parent 9e4bfa14ce08e666da732606187647cca6410b05
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 16 Aug 2022 13:22:34 +0200
prefix usage with the common prefix "usage: "
Diffstat:
M stagit-gopher-index.c | 8 +++-----
M stagit-gopher.c | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/stagit-gopher-index.c b/stagit-gopher-index.c
@@ -235,7 +235,7 @@ err:
void
usage(const char *argv0)
{
- fprintf(stderr, "%s [-b baseprefix] [repodir...]\n", argv0);
+ fprintf(stderr, "usage: %s [-b baseprefix] [repodir...]\n", argv0);
exit(1);
}
@@ -308,10 +308,8 @@ main(int argc, char *argv[])
writelog(stdout);
}
- if (!repodir) {
- fprintf(stderr, "%s [-b baseprefix] [repodir...]\n", argv[0]);
- return 1;
- }
+ if (!repodir)
+ usage(argv[0]);
/* cleanup */
git_repository_free(repo);
diff --git a/stagit-gopher.c b/stagit-gopher.c
@@ -1242,7 +1242,7 @@ writerefs(FILE *fp)
void
usage(char *argv0)
{
- fprintf(stderr, "%s [-b baseprefix] [-c cachefile | -l commits] "
+ fprintf(stderr, "usage: %s [-b baseprefix] [-c cachefile | -l commits]…
"[-u baseurl] repodir\n", argv0);
exit(1);
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.