Display a placeholder when creating links to commits with empty subjects. This avoids the creation of links of the form <a></a>.
Unified · Split
| @@ -361,7 +361,10 @@ void cgit_commit_link(char *name, const char *title, const char *class, · 360 unmodified lines | ||
| 361 | 361 | delim = "&"; |
| 362 | 362 | } |
| 363 | 363 | html("'>"); |
| 364 | − html_txt(name); | |
| 364 | + if (name[0] != '\0') | |
| 365 | + html_txt(name); | |
| 366 | + else | |
| 367 | + html_txt("(no commit message)"); | |
| 365 | 368 | html("</a>"); |
| 366 | 369 | } |
| 367 | 370 | |