mercurial/context.py
branchstable
changeset 46678 0d055849d5f9
parent 45942 89a2afe31e82
child 46794 e2f7b2695ba1
--- a/mercurial/context.py	Tue Mar 09 11:19:11 2021 +0530
+++ b/mercurial/context.py	Wed Mar 10 15:24:52 2021 +1000
@@ -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