summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -291,13 +291,14 @@ extern int cgit_diff_files(const unsigned char *old_sha1,
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);
diff --git a/shared.c b/shared.c
index 72ac140..765cd27 100644
--- a/shared.c
+++ b/shared.c
@@ -335,19 +335,19 @@ void cgit_diff_tree(const unsigned char *old_sha1,
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;
diff --git a/ui-log.c b/ui-log.c
index 41b5225..bc0c02c 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -98,13 +98,13 @@ void print_commit(struct commit *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);
}