home | blog | art | now | git gpg | email | rss

stagit

Personal fork of stagit (https://git.codemadness.org/stagit/)
git clone git://pollux.codes/git/stagit
Log | Files | Refs | README | LICENSE
commit 3477ba5730bfc64cea1bdc09bafd2944285d52ab
parent 23160609dca672c198101a46a012497a5d7baec4
Author: Pollux <pollux@pollux.codes>
Date:   Fri, 23 May 2025 13:21:25 -0500

feat: include link to tar archive for tags in refs page

Signed-off-by: Pollux <pollux@pollux.codes>

Diffstat:
Mstagit.c | 15++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/stagit.c b/stagit.c @@ -1262,7 +1262,20 @@ writerefs(FILE *fp) { s = git_reference_shorthand(ris[i].ref); fputs("<tr><td>", fp); - xmlencode(fp, s, strlen(s)); + + /* put link to tar archive if the ref is a tag */ + if(j == 1) { + fputs("<a href=\"archive/", fp); + xmlencode(fp, strippedname, strlen(strippedname)); + fputs("-", fp); + xmlencode(fp, s, strlen(s)); + fputs(".tar.gz", fp); + fputs("\">", fp); + xmlencode(fp, s, strlen(s)); + fputs("</a>", fp); + } else { + xmlencode(fp, s, strlen(s)); + } fputs("</td><td>", fp); if(ci->author) printtimeshort(fp, &(ci->author->when));