-rw-r--r-- | cgit.h | 3 | ||||
-rw-r--r-- | shared.c | 4 | ||||
-rw-r--r-- | ui-log.c | 2 |
3 files changed, 5 insertions, 4 deletions
@@ -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); @@ -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; @@ -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); } |