diff hgext/lfs/wrapper.py @ 35648:588d02d9208a

lfs: always exclude '.hg*' text files I can't think of any problematic scenarios (though things might get interesting with .hgtags, since every head is consulted). The eol extension explicitly disables handling these files, and that seems reasonable here too.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 13 Jan 2018 20:07:14 -0500
parents 188b1371d1ed
children a985834961f7
line wrap: on
line diff
--- a/hgext/lfs/wrapper.py	Mon Jan 15 00:16:11 2018 +0530
+++ b/hgext/lfs/wrapper.py	Sat Jan 13 20:07:14 2018 -0500
@@ -130,7 +130,9 @@
         textlen -= offset
 
     lfstrack = self.opener.options['lfstrack']
-    if lfstrack(self.filename, textlen):
+
+    # Always exclude hg owned files
+    if not self.filename.startswith('.hg') and lfstrack(self.filename, textlen):
         flags |= revlog.REVIDX_EXTSTORED
 
     return orig(self, text, transaction, link, p1, p2, cachedelta=cachedelta,