Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
pathspec magic: add '^' as alias for '!'
[gitweb.git]
/
pathspec.c
diff --git
a/pathspec.c
b/pathspec.c
index 7ababb315944d5536ec251b19937beef5def2538..ecad03406397338961fa0cb065b7ca18889d86ef 100644
(file)
--- a/
pathspec.c
+++ b/
pathspec.c
@@
-224,6
+224,12
@@
static const char *parse_short_magic(unsigned *magic, const char *elem)
char ch = *pos;
int i;
+ /* Special case alias for '!' */
+ if (ch == '^') {
+ *magic |= PATHSPEC_EXCLUDE;
+ continue;
+ }
+
if (!is_pathspec_magic(ch))
break;