diff -r 6b52cffd8d0a -r e2f7b2695ba1 mercurial/context.py --- 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