diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Limit rawdiff to the requested path
The diff and patch pages honour the path in the url, which the
parameter table documents for every page, but rawdiff never handed it
to git and answered with the whole diff.
Diffstat (limited to '')
| -rw-r--r-- | source/shared.h | 5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
1 file changed, 5 insertions, 0 deletions
diff --git a/source/shared.h b/source/shared.h index 9e39389..d61c1f1 100644 --- a/source/shared.h +++ b/source/shared.h @@ -60,6 +60,11 @@ extern int cgit_diff_files(const struct object_id *old_oid, const struct object_ unsigned long *old_size, unsigned long *new_size, int *binary, int context, int ignorews, linediff_fn fn); +/* + * Limit a diff to the paths below prefix, which is taken literally. + */ +extern void cgit_diff_limit_path(struct diff_options *opt, const char *prefix); + extern void cgit_diff_tree(const struct object_id *old_oid, const struct object_id *new_oid, filepair_fn fn, const char *prefix, int ignorews); extern void cgit_diff_commit(struct commit *commit, filepair_fn fn, const char *prefix); |
