[PATCH 05/20] gitignore: We're not modified any more after we wrote to disk
Mathieu Bridon
bochecha at fedoraproject.org
Wed Oct 29 12:57:03 UTC 2014
The GitIgnore.modified attribute is supposed to indicate whether the
file is in a "dirty" state, to prevent unneeded writes.
But if we just wrote it to disk, then it's not dirty any more.
---
src/pyrpkg/__init__.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pyrpkg/__init__.py b/src/pyrpkg/__init__.py
index 57d187e..1f097d3 100644
--- a/src/pyrpkg/__init__.py
+++ b/src/pyrpkg/__init__.py
@@ -2408,3 +2408,4 @@ class GitIgnore(object):
for line in self.__lines:
gitignore_file.write(line)
gitignore_file.close()
+ self.modified = False
--
2.1.0
More information about the rel-eng
mailing list