summaryrefslogtreecommitdiffabout
path: root/ui-commit.c
Unidiff
Diffstat (limited to 'ui-commit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-commit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui-commit.c b/ui-commit.c
index b5e3c01..2f4c6d4 100644
--- a/ui-commit.c
+++ b/ui-commit.c
@@ -3,25 +3,25 @@
3 * Copyright (C) 2006 Lars Hjemli 3 * Copyright (C) 2006 Lars Hjemli
4 * 4 *
5 * Licensed under GNU General Public License v2 5 * Licensed under GNU General Public License v2
6 * (see COPYING for full license text) 6 * (see COPYING for full license text)
7 */ 7 */
8 8
9#include "cgit.h" 9#include "cgit.h"
10#include "html.h" 10#include "html.h"
11#include "ui-shared.h" 11#include "ui-shared.h"
12#include "ui-diff.h" 12#include "ui-diff.h"
13#include "ui-log.h" 13#include "ui-log.h"
14 14
15void cgit_print_commit(char *hex) 15void cgit_print_commit(char *hex, const char *prefix)
16{ 16{
17 struct commit *commit, *parent; 17 struct commit *commit, *parent;
18 struct commitinfo *info; 18 struct commitinfo *info;
19 struct commit_list *p; 19 struct commit_list *p;
20 unsigned char sha1[20]; 20 unsigned char sha1[20];
21 char *tmp; 21 char *tmp;
22 int parents = 0; 22 int parents = 0;
23 23
24 if (!hex) 24 if (!hex)
25 hex = ctx.qry.head; 25 hex = ctx.qry.head;
26 26
27 if (get_sha1(hex, sha1)) { 27 if (get_sha1(hex, sha1)) {
@@ -108,16 +108,16 @@ void cgit_print_commit(char *hex)
108 html("<div class='commit-msg'>"); 108 html("<div class='commit-msg'>");
109 if (ctx.repo->commit_filter) 109 if (ctx.repo->commit_filter)
110 cgit_open_filter(ctx.repo->commit_filter); 110 cgit_open_filter(ctx.repo->commit_filter);
111 html_txt(info->msg); 111 html_txt(info->msg);
112 if (ctx.repo->commit_filter) 112 if (ctx.repo->commit_filter)
113 cgit_close_filter(ctx.repo->commit_filter); 113 cgit_close_filter(ctx.repo->commit_filter);
114 html("</div>"); 114 html("</div>");
115 if (parents < 3) { 115 if (parents < 3) {
116 if (parents) 116 if (parents)
117 tmp = sha1_to_hex(commit->parents->item->object.sha1); 117 tmp = sha1_to_hex(commit->parents->item->object.sha1);
118 else 118 else
119 tmp = NULL; 119 tmp = NULL;
120 cgit_print_diff(ctx.qry.sha1, tmp, NULL); 120 cgit_print_diff(ctx.qry.sha1, tmp, prefix);
121 } 121 }
122 cgit_free_commitinfo(info); 122 cgit_free_commitinfo(info);
123} 123}