diff options
| author | 2013-05-18 23:54:49 (JST) | |
|---|---|---|
| committer | 2013-05-22 19:53:06 (JST) | |
| commit | 927060c5d8d82a9422fc1dcf6d1379d21071b158 (patch) | |
| tree | cb14b13c342caf2a75582d0bc904f37a63e366be /ui-log.c | |
| parent | c2b79dd8e0020c1c10b61fa1a6c58afd53738c85 (diff) | |
| download | cgit-927060c5d8d82a9422fc1dcf6d1379d21071b158.zip cgit-927060c5d8d82a9422fc1dcf6d1379d21071b158.tar.gz | |
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.c | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -61,6 +61,7 @@ void show_commit_decorations(struct commit *commit) | |||
| 61 | 61 | ||
| 62 | buf[sizeof(buf) - 1] = 0; | 62 | buf[sizeof(buf) - 1] = 0; |
| 63 | deco = lookup_decoration(&name_decoration, &commit->object); | 63 | deco = lookup_decoration(&name_decoration, &commit->object); |
| 64 | html("<span class='decoration'>"); | ||
| 64 | while (deco) { | 65 | while (deco) { |
| 65 | if (!prefixcmp(deco->name, "refs/heads/")) { | 66 | if (!prefixcmp(deco->name, "refs/heads/")) { |
| 66 | strncpy(buf, deco->name + 11, sizeof(buf) - 1); | 67 | strncpy(buf, deco->name + 11, sizeof(buf) - 1); |
| @@ -94,6 +95,7 @@ void show_commit_decorations(struct commit *commit) | |||
| 94 | next: | 95 | next: |
| 95 | deco = deco->next; | 96 | deco = deco->next; |
| 96 | } | 97 | } |
| 98 | html("</span>"); | ||
| 97 | } | 99 | } |
| 98 | 100 | ||
| 99 | static void print_commit(struct commit *commit, struct rev_info *revs) | 101 | static void print_commit(struct commit *commit, struct rev_info *revs) |
