diff options
author | Lars Hjemli | 2011-06-06 19:29:58 +0000 |
---|---|---|
committer | Lars Hjemli | 2011-06-13 23:03:46 +0000 |
commit | 3ec6b309505dc5f7ba14abe8861b02da34a9df0b (patch) | |
tree | 4dda97c3b85d8103f05332677c6e0a15113f3cf3 /ui-commit.c | |
parent | b88cda6e5b4472fc1bb0ae00d9fb974ec4f61d7a (diff) | |
download | cgit-3ec6b309505dc5f7ba14abe8861b02da34a9df0b.tar.gz cgit-3ec6b309505dc5f7ba14abe8861b02da34a9df0b.tar.bz2 cgit-3ec6b309505dc5f7ba14abe8861b02da34a9df0b.zip |
cgit.c: always setup cgit repo environment variables
When cgit learned to setup environment variables for certain repo
settings before invoking a filter process, the setup occurred inside
cgit_open_filter().
This patch moves the setup out of cgit_open_filter() and into
prepare_repo_cmd() to prepare for additional uses of these variables.
Reviewed-by: Ferry Huberts <mailings@hupie.com>
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'ui-commit.c')
-rw-r--r-- | ui-commit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ui-commit.c b/ui-commit.c index a69dec6..536a8e8 100644 --- a/ui-commit.c +++ b/ui-commit.c | |||
@@ -106,7 +106,7 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
106 | html("</table>\n"); | 106 | html("</table>\n"); |
107 | html("<div class='commit-subject'>"); | 107 | html("<div class='commit-subject'>"); |
108 | if (ctx.repo->commit_filter) | 108 | if (ctx.repo->commit_filter) |
109 | cgit_open_filter(ctx.repo->commit_filter, ctx.repo); | 109 | cgit_open_filter(ctx.repo->commit_filter); |
110 | html_txt(info->subject); | 110 | html_txt(info->subject); |
111 | if (ctx.repo->commit_filter) | 111 | if (ctx.repo->commit_filter) |
112 | cgit_close_filter(ctx.repo->commit_filter); | 112 | cgit_close_filter(ctx.repo->commit_filter); |
@@ -114,7 +114,7 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
114 | html("</div>"); | 114 | html("</div>"); |
115 | html("<div class='commit-msg'>"); | 115 | html("<div class='commit-msg'>"); |
116 | if (ctx.repo->commit_filter) | 116 | if (ctx.repo->commit_filter) |
117 | cgit_open_filter(ctx.repo->commit_filter, ctx.repo); | 117 | cgit_open_filter(ctx.repo->commit_filter); |
118 | html_txt(info->msg); | 118 | html_txt(info->msg); |
119 | if (ctx.repo->commit_filter) | 119 | if (ctx.repo->commit_filter) |
120 | cgit_close_filter(ctx.repo->commit_filter); | 120 | cgit_close_filter(ctx.repo->commit_filter); |
@@ -123,7 +123,7 @@ void cgit_print_commit(char *hex, const char *prefix) | |||
123 | html("<div class='notes-header'>Notes</div>"); | 123 | html("<div class='notes-header'>Notes</div>"); |
124 | html("<div class='notes'>"); | 124 | html("<div class='notes'>"); |
125 | if (ctx.repo->commit_filter) | 125 | if (ctx.repo->commit_filter) |
126 | cgit_open_filter(ctx.repo->commit_filter, ctx.repo); | 126 | cgit_open_filter(ctx.repo->commit_filter); |
127 | html_txt(notes.buf); | 127 | html_txt(notes.buf); |
128 | if (ctx.repo->commit_filter) | 128 | if (ctx.repo->commit_filter) |
129 | cgit_close_filter(ctx.repo->commit_filter); | 129 | cgit_close_filter(ctx.repo->commit_filter); |