Fix up some code after aplanas' continued review
This commit is contained in:
10
lib/git.py
10
lib/git.py
@@ -256,11 +256,11 @@ class Git:
|
||||
)
|
||||
return any(fnmatch.fnmatch(filename, line) for line in patterns)
|
||||
|
||||
def remove(self, filename):
|
||||
self.repo.index.remove(filename)
|
||||
(self.path / filename).unlink()
|
||||
def remove(self, file: pathlib.Path):
|
||||
self.repo.index.remove(file.name)
|
||||
(self.path / file).unlink()
|
||||
|
||||
patterns = self.get_specific_lfs_gitattributes()
|
||||
if filename in patterns:
|
||||
patterns.remove(filename)
|
||||
if file.name in patterns:
|
||||
patterns.remove(file.name)
|
||||
self.add_specific_lfs_gitattributes(patterns)
|
||||
|
Reference in New Issue
Block a user