Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Build a literal pathspec in one place
Git's pathspec item holds a const string now, so a path needs no
writable copy to be matched.
Diffstat (limited to 'source/shared.h')
| -rw-r--r-- | source/shared.h | 6 |
1 file changed, 6 insertions, 0 deletions
diff --git a/source/shared.h b/source/shared.h index 09e9296..2633a24 100644 --- a/source/shared.h +++ b/source/shared.h @@ -73,6 +73,12 @@ extern int cgit_diff_files(const struct object_id *old_oid, const struct object_ extern int cgit_blob_too_large(size_t size); /* + * Point ps at item alone, set to match path literally rather than as a glob, + * or at no item when path is NULL, which leaves every path matching. + */ +extern void cgit_literal_pathspec(struct pathspec *ps, struct pathspec_item *item, const char *path); + +/* * 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); |
