scm: reset tracked files after every operation

Fix #1475
This commit is contained in:
Mr. Outis
2019-07-23 15:10:48 -05:00
parent 507879e841
commit 9ca5452603
3 changed files with 9 additions and 0 deletions
+1
View File
@@ -2,6 +2,7 @@ def scm_context(method):
def run(repo, *args, **kw):
try:
result = method(repo, *args, **kw)
repo.scm.reset_tracked_files()
repo.scm.reset_ignores()
repo.scm.remind_to_track()
return result
+5
View File
@@ -126,6 +126,11 @@ class Base(object):
Method to reset in-memory ignore storing mechanism.
"""
def reset_tracked_files(self):
"""
Method to reset in-memory tracked files storing mechanism.
"""
def remind_to_track(self):
"""
Method to remind user to track newly created files handled by scm
+3
View File
@@ -245,6 +245,9 @@ class Git(Base):
def reset_ignores(self):
self.ignored_paths = []
def reset_tracked_files(self):
self.files_to_track = []
def remind_to_track(self):
if not self.files_to_track:
return