List for cgit developers and users
 help / color / mirror / Atom feed
* [PATCH] ui-log: add <span/> around commit decorations
@ 2013-05-18 14:54 john
  2013-05-18 15:07 ` Jason
  0 siblings, 1 reply; 2+ messages in thread
From: john @ 2013-05-18 14:54 UTC (permalink / raw)


This helps projects that have a large number of tags to display them all
using custom CSS.

The default stylesheet has not been updated since what is useful for
projects with a lot of tags is not the same as what is useful for
projects with only a small number of decorations per commit.

Suggested-by: Konstantin Ryabitsev <mricon at kernel.org>
Signed-off-by: John Keeping <john at keeping.me.uk>
---
 ui-log.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ui-log.c b/ui-log.c
index 2aa12c3..6f1249b 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -61,6 +61,7 @@ void show_commit_decorations(struct commit *commit)
 
 	buf[sizeof(buf) - 1] = 0;
 	deco = lookup_decoration(&name_decoration, &commit->object);
+	html("<span class='decoration'>");
 	while (deco) {
 		if (!prefixcmp(deco->name, "refs/heads/")) {
 			strncpy(buf, deco->name + 11, sizeof(buf) - 1);
@@ -94,6 +95,7 @@ void show_commit_decorations(struct commit *commit)
 next:
 		deco = deco->next;
 	}
+	html("</span>");
 }
 
 static void print_commit(struct commit *commit, struct rev_info *revs)
-- 
1.8.3.rc2.285.gfc18c2c



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

* [PATCH] ui-log: add <span/> around commit decorations
  2013-05-18 14:54 [PATCH] ui-log: add <span/> around commit decorations john
@ 2013-05-18 15:07 ` Jason
  0 siblings, 0 replies; 2+ messages in thread
From: Jason @ 2013-05-18 15:07 UTC (permalink / raw)


Thanks! Merged to wip.


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

end of thread, other threads:[~2013-05-18 15:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-18 14:54 [PATCH] ui-log: add <span/> around commit decorations john
2013-05-18 15:07 ` 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).