|
|
|
@@ -72,5 +72,5 @@ static void filepair_cb(struct diff_filepair *pair) |
72 | } |
72 | } |
73 | if (cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, |
73 | if (cgit_diff_files(pair->one->sha1, pair->two->sha1, &old_size, |
74 | &new_size, &binary, print_line)) |
74 | &new_size, &binary, 0, 0, print_line)) |
75 | html("Error running diff"); |
75 | html("Error running diff"); |
76 | if (binary) |
76 | if (binary) |
@@ -78,5 +78,5 @@ static void filepair_cb(struct diff_filepair *pair) |
78 | } |
78 | } |
79 | |
79 | |
80 | void cgit_print_patch(char *hex) |
80 | void cgit_print_patch(char *hex, const char *prefix) |
81 | { |
81 | { |
82 | struct commit *commit; |
82 | struct commit *commit; |
@@ -123,5 +123,7 @@ void cgit_print_patch(char *hex) |
123 | } |
123 | } |
124 | html("---\n"); |
124 | html("---\n"); |
125 | cgit_diff_tree(old_sha1, sha1, filepair_cb, NULL); |
125 | if (prefix) |
| |
126 | htmlf("(limited to '%s')\n\n", prefix); |
| |
127 | cgit_diff_tree(old_sha1, sha1, filepair_cb, prefix, 0); |
126 | html("--\n"); |
128 | html("--\n"); |
127 | htmlf("cgit %s\n", CGIT_VERSION); |
129 | htmlf("cgit %s\n", CGIT_VERSION); |
|