diff options
| author | Junio C Hamano <gitster@pobox.com> | 2019-12-10 13:11:40 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2019-12-10 13:11:41 -0800 |
| commit | c58ae96fc4bb11916b62a96940bb70bb85ea5992 (patch) | |
| tree | 127f318728e21f3f9d7ac4229a7971e3f999956b /pathspec.h | |
| parent | 7034cd094bda4edbcdff7fad1a28fcaaf9b9a040 (diff) | |
| parent | e440fc5888bd5faf1775fc61621caa3c5fab96b6 (diff) | |
| download | git-c58ae96fc4bb11916b62a96940bb70bb85ea5992.tar.xz | |
Merge branch 'am/pathspec-from-file'
A few commands learned to take the pathspec from the
standard input or a named file, instead of taking it as the command
line arguments.
* am/pathspec-from-file:
commit: support the --pathspec-from-file option
doc: commit: synchronize <pathspec> description
reset: support the `--pathspec-from-file` option
doc: reset: synchronize <pathspec> description
pathspec: add new function to parse file
parse-options.h: add new options `--pathspec-from-file`, `--pathspec-file-nul`
Diffstat (limited to 'pathspec.h')
| -rw-r--r-- | pathspec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/pathspec.h b/pathspec.h index 1c18a2c90c..a27dc81ba2 100644 --- a/pathspec.h +++ b/pathspec.h @@ -85,6 +85,16 @@ void parse_pathspec(struct pathspec *pathspec, unsigned flags, const char *prefix, const char **args); +/* + * Same as parse_pathspec() but uses file as input. + * When 'file' is exactly "-" it uses 'stdin' instead. + */ +void parse_pathspec_file(struct pathspec *pathspec, + unsigned magic_mask, + unsigned flags, + const char *prefix, + const char *file, + int nul_term_line); void copy_pathspec(struct pathspec *dst, const struct pathspec *src); void clear_pathspec(struct pathspec *); |
