From 859b7f1d0e742493d2a9396794cd9040213ad846 Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Tue, 7 Feb 2017 21:08:15 -0800 Subject: pathspec: don't error out on all-exclusionary pathspec patterns Instead of erroring out and telling the user that they should add a positive pattern that covers everything else, just _do_ that. For commands where we honor the current cwd by default (ie grep, ls-files etc), we make that default positive pathspec be the current working directory. And for commands that default to the whole project (ie diff, log, etc), the default positive pathspec is the whole project. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano --- Documentation/glossary-content.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation/glossary-content.txt') diff --git a/Documentation/glossary-content.txt b/Documentation/glossary-content.txt index 822ca83264..fc9320e59e 100644 --- a/Documentation/glossary-content.txt +++ b/Documentation/glossary-content.txt @@ -387,7 +387,9 @@ Glob magic is incompatible with literal magic. exclude;; After a path matches any non-exclude pathspec, it will be run through all exclude pathspec (magic signature: `!` or its - synonym `^`). If it matches, the path is ignored. + synonym `^`). If it matches, the path is ignored. When there + is no non-exclude pathspec, the exclusion is applied to the + result set as if invoked without any pathspec. -- [[def_parent]]parent:: -- cgit v1.2.3