summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.h3
-rw-r--r--shared.c4
-rw-r--r--ui-log.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/cgit.h b/cgit.h
index a9896cf..f5f68ac 100644
--- a/cgit.h
+++ b/cgit.h
@@ -289,17 +289,18 @@ extern int cgit_diff_files(const unsigned char *old_sha1,
unsigned long *old_size, unsigned long *new_size,
int *binary, int context, int ignorews,
linediff_fn fn);
extern void cgit_diff_tree(const unsigned char *old_sha1,
const unsigned char *new_sha1,
filepair_fn fn, const char *prefix, int ignorews);
-extern void cgit_diff_commit(struct commit *commit, filepair_fn fn);
+extern void cgit_diff_commit(struct commit *commit, filepair_fn fn,
+ const char *prefix);
__attribute__((format (printf,1,2)))
extern char *fmt(const char *format,...);
extern struct commitinfo *cgit_parse_commit(struct commit *commit);
extern struct taginfo *cgit_parse_tag(struct tag *tag);
extern void cgit_parse_url(const char *url);
diff --git a/shared.c b/shared.c
index 72ac140..765cd27 100644
--- a/shared.c
+++ b/shared.c
@@ -333,23 +333,23 @@ void cgit_diff_tree(const unsigned char *old_sha1,
if (old_sha1 && !is_null_sha1(old_sha1))
ret = diff_tree_sha1(old_sha1, new_sha1, "", &opt);
else
ret = diff_root_tree_sha1(new_sha1, "", &opt);
diffcore_std(&opt);
diff_flush(&opt);
}
-void cgit_diff_commit(struct commit *commit, filepair_fn fn)
+void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix)
{
unsigned char *old_sha1 = NULL;
if (commit->parents)
old_sha1 = commit->parents->item->object.sha1;
- cgit_diff_tree(old_sha1, commit->object.sha1, fn, NULL,
+ cgit_diff_tree(old_sha1, commit->object.sha1, fn, prefix,
ctx.qry.ignorews);
}
int cgit_parse_snapshots_mask(const char *str)
{
const struct cgit_snapshot_format *f;
static const char *delim = " \t,:/|;";
int tl, sl, rv = 0;
diff --git a/ui-log.c b/ui-log.c
index 41b5225..bc0c02c 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -96,17 +96,17 @@ void print_commit(struct commit *commit)
sha1_to_hex(commit->object.sha1), ctx.qry.vpath, 0);
show_commit_decorations(commit);
html("</td><td>");
html_txt(info->author);
if (ctx.repo->enable_log_filecount) {
files = 0;
add_lines = 0;
rem_lines = 0;
- cgit_diff_commit(commit, inspect_files);
+ cgit_diff_commit(commit, inspect_files, ctx.qry.vpath);
html("</td><td>");
htmlf("%d", files);
if (ctx.repo->enable_log_linecount) {
html("</td><td>");
htmlf("-%d/+%d", rem_lines, add_lines);
}
}
html("</td></tr>\n");