summaryrefslogtreecommitdiffstatshomepage
path: root/ui-log.c
diff options
context:
space:
mode:
authorJohn Keeping2013-05-18 15:54:49 +0100
committerJason A. Donenfeld2013-05-22 12:53:06 +0200
commit927060c5d8d82a9422fc1dcf6d1379d21071b158 (patch)
treecb14b13c342caf2a75582d0bc904f37a63e366be /ui-log.c
parentc2b79dd8e0020c1c10b61fa1a6c58afd53738c85 (diff)
downloadcgit-927060c5d8d82a9422fc1dcf6d1379d21071b158.tar
cgit-927060c5d8d82a9422fc1dcf6d1379d21071b158.tar.gz
cgit-927060c5d8d82a9422fc1dcf6d1379d21071b158.zip
ui-log: add <span/> around commit decorations
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@kernel.org> Signed-off-by: John Keeping <john@keeping.me.uk>
Diffstat (limited to 'ui-log.c')
-rw-r--r--ui-log.c2
1 files changed, 2 insertions, 0 deletions
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)
'>173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237