diff --git a/filemanip.py b/filemanip.py index 0819aea..b137e05 100644 --- a/filemanip.py +++ b/filemanip.py @@ -144,7 +144,12 @@ class GitTransactionStore(TransactionStore): def commit_close(self): with self.DirectoryChanger(self._prefix) as dc: if "w" in self._mode: + potentials = [self._name + ".checksum", "lock", "version", + "schema"] self._call_git("add", self._name) + for f in potentials: + if os.access(f, os.F_OK): + self._call_git("add", f) now = datetime.datetime.utcnow() message = "Snapshot of " + self._name + " as of " message += "{:%Y-%m-%d %H:%M:%S} UTC".format(now)