]> git.armaanb.net Git - stagit.git/commitdiff
refs: only make commit link work for tags
authorHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 6 Jan 2016 18:13:51 +0000 (19:13 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 6 Jan 2016 18:13:51 +0000 (19:13 +0100)
stagit.c

index 966ee55c3654c410eac7c4ad7500a29fe4f25af8..5bef86501a42b370bc5e5c13dd3289a0e1f6117d 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -842,15 +842,17 @@ writerefs(FILE *fp)
                                printtimeshort(fp, &(ci->author->when));
                        fputs("</td><td>", fp);
                        if (ci->summary) {
-                               fprintf(fp, "<a href=\"%scommit/%s.html\">",
-                                       relpath, ci->oid);
+                               if (j)
+                                       fprintf(fp, "<a href=\"%scommit/%s.html\">",
+                                               relpath, ci->oid);
                                if ((len = strlen(ci->summary)) > summarylen) {
                                        xmlencode(fp, ci->summary, summarylen - 1);
                                        fputs("…", fp);
                                } else {
                                        xmlencode(fp, ci->summary, len);
                                }
-                               fputs("</a>", fp);
+                               if (j)
+                                       fputs("</a>", fp);
                        }
                        fputs("</td><td>", fp);
                        if (ci->author)