From a32e1bf36f4c17a33fedf6de319852175f571d0f Mon Sep 17 00:00:00 2001 From: Pascal de Bruijn Date: Wed, 22 Jan 2020 11:24:53 +0100 Subject: [PATCH] .chkbitignore: add wildcard matching --- chkbit/index.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chkbit/index.py b/chkbit/index.py index f85918d..e4740fe 100644 --- a/chkbit/index.py +++ b/chkbit/index.py @@ -1,3 +1,4 @@ +import fnmatch import os import subprocess import sys @@ -43,7 +44,10 @@ class Index: return os.path.join(self.path, INDEX) def should_ignore(self, name): - return name in self.ignore + for ignore in self.ignore: + if fnmatch.fnmatch(name, ignore): + return True + return False def _setmod(self): self.modified = True