List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] ui-shared: use placeholder for empty commit subject
@ 2012-10-28 17:36 nobody
  2012-10-28 17:54 ` Jason
  0 siblings, 1 reply; 2+ messages in thread
From: nobody @ 2012-10-28 17:36 UTC (permalink / raw)


Display a placeholder when creating links to commits with empty subjects.
This avoids the creation of links of the form <a></a>.
---
 ui-shared.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ui-shared.c b/ui-shared.c
index d9d5da7..75b97a1 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -361,7 +361,10 @@ void cgit_commit_link(char *name, const char *title, const char *class,
 		delim = "&amp;";
 	}
 	html("'>");
-	html_txt(name);
+	if (name[0] != '\0')
+		html_txt(name);
+	else
+		html_txt("(no commit message)");
 	html("</a>");
 }
 
-- 
1.7.12





^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] ui-shared: use placeholder for empty commit subject
  2012-10-28 17:36 [PATCH] ui-shared: use placeholder for empty commit subject nobody
@ 2012-10-28 17:54 ` Jason
  0 siblings, 0 replies; 2+ messages in thread
From: Jason @ 2012-10-28 17:54 UTC (permalink / raw)


Great, thanks. Merged:
http://git.zx2c4.com/cgit/commit/?id=fe1bb0e765883fa4149fba12daee81b6ae070de3




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-10-28 17:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-28 17:36 [PATCH] ui-shared: use placeholder for empty commit subject nobody
2012-10-28 17:54 ` Jason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).