This commit is contained in:
Paul Gauthier 2023-10-18 12:22:01 -07:00
parent 1a2370f9ae
commit df27007c00
2 changed files with 1 additions and 5 deletions

View file

@ -206,7 +206,7 @@ class GitRepo:
if not self.aider_ignore_file or not self.aider_ignore_file.is_file(): if not self.aider_ignore_file or not self.aider_ignore_file.is_file():
return fnames return fnames
mtime = self.aider_ignore_file.stat().st_mtime mtime = Path(str(self.aider_ignore_file)).stat().st_mtime
dump(mtime) dump(mtime)
if mtime != self.aider_ignore_ts: if mtime != self.aider_ignore_ts:
self.aider_ignore_ts = mtime self.aider_ignore_ts = mtime

View file

@ -1,6 +1,5 @@
import os import os
import tempfile import tempfile
import time
import unittest import unittest
from pathlib import Path from pathlib import Path
from unittest.mock import patch from unittest.mock import patch
@ -203,9 +202,6 @@ class TestRepo(unittest.TestCase):
self.assertIn(str(fname), fnames) self.assertIn(str(fname), fnames)
self.assertIn(str(fname2), fnames) self.assertIn(str(fname2), fnames)
# github actions don't seem to update the mtime?
time.sleep(1)
aiderignore.write_text("new.txt\n") aiderignore.write_text("new.txt\n")
# new.txt should be gone! # new.txt should be gone!