stagit

[fork] HTML git frontend
git clone https://hhvn.uk/stagit
git clone git://hhvn.uk/stagit
Log | Files | Refs | README | LICENSE

commit 0239cfc11a696eb8888dcf47e8316d58ecd9e073
parent b4156d0d8704a1b8f407bebcab874eca02890b49
Author: hhvn <dev@hhvn.uk>
Date:   Tue, 29 Aug 2023 23:50:46 +0100

Inherit some changes from 1.2

Diffstat:
MMakefile | 2+-
Mstagit-index.c | 4+---
Mstagit.c | 8+++-----
3 files changed, 5 insertions(+), 9 deletions(-)

diff --git a/Makefile b/Makefile @@ -1,7 +1,7 @@ .POSIX: NAME = stagit -VERSION = 1.1 +VERSION = 1.2 # paths PREFIX = /usr/local diff --git a/stagit-index.c b/stagit-index.c @@ -188,7 +188,7 @@ main(int argc, char *argv[]) int i, ret = 0; if (argc < 2) { - fprintf(stderr, "%s [repodir...]\n", argv[0]); + fprintf(stderr, "usage: %s [repodir...]\n", argv[0]); return 1; } @@ -197,10 +197,8 @@ main(int argc, char *argv[]) git_libgit2_init(); for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++) git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, ""); -#ifdef GIT_OPT_SET_OWNER_VALIDATION /* do not require the git repository to be owned by the current user */ git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0); -#endif #ifdef __OpenBSD__ if (pledge("stdio rpath", NULL) == -1) diff --git a/stagit.c b/stagit.c @@ -860,7 +860,7 @@ printcommitatom(FILE *fp, struct commitinfo *ci, const char *tag) fputs("</updated>\n", fp); } if (ci->summary) { - fputs("<title type=\"text\">", fp); + fputs("<title>", fp); if (tag && tag[0]) { fputs("[", fp); xmlencode(fp, tag, strlen(tag)); @@ -880,7 +880,7 @@ printcommitatom(FILE *fp, struct commitinfo *ci, const char *tag) fputs("</email>\n</author>\n", fp); } - fputs("<content type=\"text\">", fp); + fputs("<content>", fp); fprintf(fp, "commit %s\n", ci->oid); if (ci->parentoid[0]) fprintf(fp, "parent %s\n", ci->parentoid); @@ -1184,7 +1184,7 @@ writerefs(FILE *fp) void usage(char *argv0) { - fprintf(stderr, "%s [-c cachefile | -l commits] " + fprintf(stderr, "usage: %s [-c cachefile | -l commits] " "[-u baseurl] repodir\n", argv0); exit(1); } @@ -1235,10 +1235,8 @@ main(int argc, char *argv[]) git_libgit2_init(); for (i = 1; i <= GIT_CONFIG_LEVEL_APP; i++) git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, i, ""); -#ifdef GIT_OPT_SET_OWNER_VALIDATION /* do not require the git repository to be owned by the current user */ git_libgit2_opts(GIT_OPT_SET_OWNER_VALIDATION, 0); -#endif #ifdef __OpenBSD__ if (unveil(repodir, "r") == -1)