stagit

personal fork of stagit (rnpnr branch)
git clone anongit@rnpnr.xyz:stagit.git
Log | Files | Refs | Feed | README | LICENSE

Commit: 788d9cfa264dc25a09c6856f4127e441a3da2536
Parent: 2e9ebb09535362b9d6d341620736a0d3b527ff3b
Author: Randy Palamar
Date:   Sat,  4 Nov 2023 10:48:29 -0600

stagit-index: don't print owner name

all repos on my site are "owned" by me. Repos for other people wont
be hosted.

Diffstat:
Mstagit-index.c | 19+------------------
1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/stagit-index.c b/stagit-index.c @@ -14,7 +14,6 @@ static const char *relpath = ""; static char description[255] = "Repositories"; static char *name = ""; -static char owner[255]; /* Handle read or write errors for a FILE * stream */ void @@ -110,7 +109,7 @@ writeheader(FILE *fp) fputs("</span></td></tr><tr><td></td><td>\n" "</td></tr>\n</table>\n<hr/>\n<div id=\"content\">\n" "<table id=\"index\"><thead>\n" - "<tr><td><b>Name</b></td><td><b>Description</b></td><td><b>Owner</b></td>" + "<tr><td><b>Name</b></td><td><b>Description</b></td>" "<td><b>Last commit</b></td></tr>" "</thead><tbody>\n", fp); } @@ -156,8 +155,6 @@ writelog(FILE *fp) fputs("</a></td><td>", fp); xmlencode(fp, description, strlen(description)); fputs("</td><td>", fp); - xmlencode(fp, owner, strlen(owner)); - fputs("</td><td>", fp); if (author) printtimeshort(fp, &(author->when)); fputs("</td></tr>", fp); @@ -230,20 +227,6 @@ main(int argc, char *argv[]) fclose(fp); } - /* read owner or .git/owner */ - joinpath(path, sizeof(path), repodir, "owner"); - if (!(fp = fopen(path, "r"))) { - joinpath(path, sizeof(path), repodir, ".git/owner"); - fp = fopen(path, "r"); - } - owner[0] = '\0'; - if (fp) { - if (!fgets(owner, sizeof(owner), fp)) - owner[0] = '\0'; - checkfileerror(fp, "owner", 'r'); - fclose(fp); - owner[strcspn(owner, "\n")] = '\0'; - } writelog(stdout); } writefooter(stdout);