diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-06-21 01:53:13 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-06-21 01:53:13 +0300 |
commit | de00f4b7f3fd3aca18e4bea286bf060c595efd3b (patch) | |
tree | 48131ebe8ff1e9980da040c9afa61b738995769b /diff.h | |
parent | 7cb4274d2606775b0d5b373756f76f386a31bb64 (diff) | |
parent | 8260bc59023136edeaed1f1006a03f44cc849883 (diff) |
Merge branch 'jk/log-follow-with-non-literal-pathspec'
"git [-c log.follow=true] log [--follow] ':(glob)f**'" used to barf.
* jk/log-follow-with-non-literal-pathspec:
diff: detect pathspec magic not supported by --follow
diff: factor out --follow pathspec check
pathspec: factor out magic-to-name function
Diffstat (limited to 'diff.h')
-rw-r--r-- | diff.h | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -539,6 +539,13 @@ void repo_diff_setup(struct repository *, struct diff_options *); struct option *add_diff_options(const struct option *, struct diff_options *); int diff_opt_parse(struct diff_options *, const char **, int, const char *); void diff_setup_done(struct diff_options *); + +/* + * Returns true if the pathspec can work with --follow mode. If die_on_error is + * set, die() with a specific error message rather than returning false. + */ +int diff_check_follow_pathspec(struct pathspec *ps, int die_on_error); + int git_config_rename(const char *var, const char *value); #define DIFF_DETECT_RENAME 1 |