diff options
| author | 2012-01-04 00:30:50 (JST) | |
|---|---|---|
| committer | 2012-01-04 00:35:06 (JST) | |
| commit | 0b6a716d1b9f18e8cc00940a7962e542b9358238 (patch) | |
| tree | 7fa04f27c6702de2b2a0bc7752a3204250696fba | |
| parent | 7530d94f05887b8065742adb614c368d8568a22c (diff) | |
| download | cgit-0b6a716d1b9f18e8cc00940a7962e542b9358238.zip cgit-0b6a716d1b9f18e8cc00940a7962e542b9358238.tar.gz | |
ui-log.c: do not show remote heads if enable-remote-branches=0
If remote branches are not enabled, the branches are still listed in
the log view. This patch removes them if enable-remote-branches=0.
| -rw-r--r-- | ui-log.c | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -76,6 +76,8 @@ void show_commit_decorations(struct commit *commit) | |||
| 76 | cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf); | 76 | cgit_tag_link(buf, NULL, "tag-deco", ctx.qry.head, buf); |
| 77 | } | 77 | } |
| 78 | else if (!prefixcmp(deco->name, "refs/remotes/")) { | 78 | else if (!prefixcmp(deco->name, "refs/remotes/")) { |
| 79 | if (!ctx.repo->enable_remote_branches) | ||
| 80 | goto next; | ||
| 79 | strncpy(buf, deco->name + 13, sizeof(buf) - 1); | 81 | strncpy(buf, deco->name + 13, sizeof(buf) - 1); |
| 80 | cgit_log_link(buf, NULL, "remote-deco", NULL, | 82 | cgit_log_link(buf, NULL, "remote-deco", NULL, |
| 81 | sha1_to_hex(commit->object.sha1), | 83 | sha1_to_hex(commit->object.sha1), |
| @@ -88,6 +90,7 @@ void show_commit_decorations(struct commit *commit) | |||
| 88 | sha1_to_hex(commit->object.sha1), | 90 | sha1_to_hex(commit->object.sha1), |
| 89 | ctx.qry.vpath, 0); | 91 | ctx.qry.vpath, 0); |
| 90 | } | 92 | } |
| 93 | next: | ||
| 91 | deco = deco->next; | 94 | deco = deco->next; |
| 92 | } | 95 | } |
| 93 | } | 96 | } |
