aboutsummaryrefslogtreecommitdiffstats
path: root/pathspec.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2023-06-20 15:53:13 -0700
committerJunio C Hamano <gitster@pobox.com>2023-06-20 15:53:13 -0700
commitde00f4b7f3fd3aca18e4bea286bf060c595efd3b (patch)
tree48131ebe8ff1e9980da040c9afa61b738995769b /pathspec.h
parentMerge branch 'vd/worktree-config-is-per-repository' (diff)
parentdiff: detect pathspec magic not supported by --follow (diff)
downloadgit-de00f4b7f3fd3aca18e4bea286bf060c595efd3b.tar.gz
git-de00f4b7f3fd3aca18e4bea286bf060c595efd3b.zip
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 'pathspec.h')
-rw-r--r--pathspec.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/pathspec.h b/pathspec.h
index a5b38e0907..fec4399bbc 100644
--- a/pathspec.h
+++ b/pathspec.h
@@ -130,6 +130,14 @@ void parse_pathspec_file(struct pathspec *pathspec,
void copy_pathspec(struct pathspec *dst, const struct pathspec *src);
void clear_pathspec(struct pathspec *);
+/*
+ * Add a human-readable string to "out" representing the PATHSPEC_* flags set
+ * in "magic". The result is suitable for error messages, but not for
+ * parsing as pathspec magic itself (you get 'icase' with quotes, not
+ * :(icase)).
+ */
+void pathspec_magic_names(unsigned magic, struct strbuf *out);
+
static inline int ps_strncmp(const struct pathspec_item *item,
const char *s1, const char *s2, size_t n)
{