Diff options
Diffstat (limited to 'source')
| -rw-r--r-- | source/ui-diff.c | 12 |
1 file changed, 8 insertions, 4 deletions
diff --git a/source/ui-diff.c b/source/ui-diff.c index 958d6e7..c696ab1 100644 --- a/source/ui-diff.c +++ b/source/ui-diff.c @@ -431,16 +431,20 @@ static void inspect_filepair(struct diff_filepair *pair) total_rems += lines_removed; } +/* + * The header names the path the request gave, which under follow is applied + * by show_filepair while the walk itself runs over the whole commit. + */ static void print_diffstat(const struct object_id *old_oid, const struct object_id *new_oid, - const char *prefix) + const char *prefix, const char *path) { int i; html("<div class='diffstat-header'>"); cgit_diff_link("Diffstat", NULL, NULL, ctx.qry.head, ctx.qry.oid, ctx.qry.oid2, NULL); - if (prefix) { + if (path) { html(" (limited to '"); - html_txt(prefix); + html_txt(path); html("')"); } html("</div>\n"); @@ -659,7 +663,7 @@ void cgit_print_diff(const char *new_rev, const char *old_rev, const char *prefi if (difftype == DIFF_STATONLY) ctx.qry.difftype = ctx.cfg.difftype; - print_diffstat(old_rev_oid, new_rev_oid, prefix); + print_diffstat(old_rev_oid, new_rev_oid, prefix, path); if (difftype == DIFF_STATONLY) { if (show_ctrls) |
