mercurial/context.py
changeset 46794 e2f7b2695ba1
parent 46416 bc3f3b59d0a4
parent 46678 0d055849d5f9
child 46819 d4ba4d51f85f
--- a/mercurial/context.py	Tue Mar 02 00:05:22 2021 +0100
+++ b/mercurial/context.py	Thu Mar 18 18:24:59 2021 -0400
@@ -993,8 +993,10 @@
                 # if file data starts with '\1\n', empty metadata block is
                 # prepended, which adds 4 bytes to filelog.size().
                 return self._filelog.cmp(self._filenode, fctx.data())
-        if self.size() == fctx.size():
+        if self.size() == fctx.size() or self.flags() == b'l':
             # size() matches: need to compare content
+            # issue6456: Always compare symlinks because size can represent
+            # encrypted string for EXT-4 encryption(fscrypt).
             return self._filelog.cmp(self._filenode, fctx.data())
 
         # size() differs