regression: do not show unset or empty tags - stagit - static git page generator
 (HTM) git clone git://git.codemadness.org/stagit
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit f05e6b0fcb3b874180970d06ebcde05fb5aea470
 (DIR) parent d80a163acd47df2bd9ab145be6b249814aa9eceb
 (HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
       Date:   Mon, 20 Jul 2020 14:15:12 +0200
       
       regression: do not show unset or empty tags
       
       Diffstat:
         M stagit.c                            |       2 +-
       
       1 file changed, 1 insertion(+), 1 deletion(-)
       ---
 (DIR) diff --git a/stagit.c b/stagit.c
       @@ -797,7 +797,7 @@ printcommitatom(FILE *fp, struct commitinfo *ci, const char *tag)
                }
                if (ci->summary) {
                        fputs("<title type=\"text\">", fp);
       -                if (tag) {
       +                if (tag && tag[0]) {
                                fputs("[", fp);
                                xmlencode(fp, tag, strlen(tag));
                                fputs("] ", fp);