From 2c5923ab1a76e321ed752377c54e73ced2ae3c4c Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 11 Aug 2022 12:20:17 +0100 Subject: [PATCH] filter: make sure we check --files-from when looking for a single file --- fs/filter/filter.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fs/filter/filter.go b/fs/filter/filter.go index 6f4ba9d5a..997070bd7 100644 --- a/fs/filter/filter.go +++ b/fs/filter/filter.go @@ -375,6 +375,11 @@ func (f *Filter) InActive() bool { // IncludeRemote returns whether this remote passes the filter rules. func (f *Filter) IncludeRemote(remote string) bool { + // filesFrom takes precedence + if f.files != nil { + _, include := f.files[remote] + return include + } for _, rule := range f.fileRules.rules { if rule.Match(remote) { return rule.Include