aboutsummaryrefslogtreecommitdiff
path: root/internal/fusefrontend_reverse/excluder.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-08-15 17:31:25 +0200
committerJakob Unterwurzacher2020-08-15 17:31:45 +0200
commit94e8fc12ea5756a130e7ac9ed67ddd519b5f3a22 (patch)
tree44186807f71db8c555af23f8969f8f1456c955f9 /internal/fusefrontend_reverse/excluder.go
parent15b0b4a5fd268b421ddc347e4417b2538a540922 (diff)
v2api/reverse: finish -exclude
Tests pass now.
Diffstat (limited to 'internal/fusefrontend_reverse/excluder.go')
-rw-r--r--internal/fusefrontend_reverse/excluder.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/fusefrontend_reverse/excluder.go b/internal/fusefrontend_reverse/excluder.go
index b6cb961..8a13fa7 100644
--- a/internal/fusefrontend_reverse/excluder.go
+++ b/internal/fusefrontend_reverse/excluder.go
@@ -2,6 +2,7 @@ package fusefrontend_reverse
import (
"io/ioutil"
+ "log"
"os"
"strings"
@@ -15,12 +16,9 @@ import (
// prepareExcluder creates an object to check if paths are excluded
// based on the patterns specified in the command line.
func prepareExcluder(args fusefrontend.Args) *ignore.GitIgnore {
- if len(args.Exclude) == 0 && len(args.ExcludeWildcard) == 0 && len(args.ExcludeFrom) == 0 {
- return nil
- }
patterns := getExclusionPatterns(args)
if len(patterns) == 0 {
- panic(patterns)
+ log.Panic(patterns)
}
excluder, err := ignore.CompileIgnoreLines(patterns...)
if err != nil {