tstagit.c: only link to tarballs for master branch and tags - stagit - [fork] c… | |
git clone git://src.adamsgaard.dk/stagit | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 02b67e7268ee2cb11a0fe254a832f7e6f0dcf85d | |
parent 9bed6322e863501bc279ac700275527b7ddbd02e | |
Author: Anders Damsgaard <[email protected]> | |
Date: Mon, 23 Nov 2020 20:56:30 +0100 | |
stagit.c: only link to tarballs for master branch and tags | |
Diffstat: | |
M stagit.c | 10 +++++++--- | |
1 file changed, 7 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/stagit.c b/stagit.c | |
t@@ -1101,10 +1101,14 @@ writerefs(FILE *fp) | |
s = git_reference_shorthand(ris[i].ref); | |
fputs("<tr><td>", fp); | |
- fprintf(fp, "<a href=\"%s/%s/%s-%s.tar.gz\">", | |
- releasedir, strippedname, strippedname, s); | |
+ if (strncmp(s, "master", strlen(s)) == 0 || | |
+ strncmp(ids[j], "tags", strlen(ids[j])) == 0) | |
+ fprintf(fp, "<a href=\"%s/%s/%s-%s.tar.gz\">", | |
+ releasedir, strippedname, strippedname… | |
xmlencode(fp, s, strlen(s)); | |
- fputs("</a>", fp); | |
+ if (strncmp(s, "master", strlen(s)) == 0 || | |
+ strncmp(ids[j], "tags", strlen(ids[j])) == 0) | |
+ fputs("</a>", fp); | |
fputs("</td><td>", fp); | |
if (ci->author) | |
printtimeshort(fp, &(ci->author->when)); |