Re: [PATCH v1 44/45] pathspec: support :(glob) syntax
From: Eric Sunshine <hidden>
Date: 2016-06-15 22:56:24
On Fri, Mar 15, 2013 at 2:06 AM, Nguyễn Thái Ngọc Duy [off-list ref] wrote:
+GIT_GLOB_PATHSPECS:: + Setting this variable to `1` will cause git to treat all + pathspecs as glob patterns (aka "glob" magic).
Per recent git -> Git normalization, probably: s/git/Git/
+ +GIT_NOGLOB_PATHSPECS:: + Setting this variable to `1` will cause git to treat all + pathspecs as literal (aka "literal" magic).
Ditto: s/git/Git/
quoted hunk ↗ jump to hunk
@@ -103,6 +105,22 @@ static unsigned prefix_pathspec(struct pathspec_item *item, if (literal_global) global_magic |= PATHSPEC_LITERAL; + if (glob_global < 0) + glob_global = git_env_bool(GIT_GLOB_PATHSPECS_ENVIRONMENT, 0); + if (glob_global) + global_magic |= PATHSPEC_GLOB; + + if (noglob_global < 0) + noglob_global = git_env_bool(GIT_NOGLOB_PATHSPECS_ENVIRONMENT, 0); + + if (glob_global && noglob_global) + die(_("global 'glob' and 'noglob' pathspec settings are incompatible")); + + if ((global_magic & PATHSPEC_LITERAL) && + (global_magic & ~PATHSPEC_LITERAL)) + die(_("global 'literal' pathspec setting is incompatiable " + "with all other global pathspec settings"));
s/incompatiable/incompatible/ -- ES