##// END OF EJS Templates
enclink: check contents of symlinks not just size in case of fcrypt...
Corey Schuhen -
r47436:0d055849 stable
parent child Browse files
Show More
@@ -993,8 +993,10 b' class basefilectx(object):'
993 # if file data starts with '\1\n', empty metadata block is
993 # if file data starts with '\1\n', empty metadata block is
994 # prepended, which adds 4 bytes to filelog.size().
994 # prepended, which adds 4 bytes to filelog.size().
995 return self._filelog.cmp(self._filenode, fctx.data())
995 return self._filelog.cmp(self._filenode, fctx.data())
996 if self.size() == fctx.size():
996 if self.size() == fctx.size() or self.flags() == b'l':
997 # size() matches: need to compare content
997 # size() matches: need to compare content
998 # issue6456: Always compare symlinks because size can represent
999 # encrypted string for EXT-4 encryption(fscrypt).
998 return self._filelog.cmp(self._filenode, fctx.data())
1000 return self._filelog.cmp(self._filenode, fctx.data())
999
1001
1000 # size() differs
1002 # size() differs
@@ -1279,7 +1279,12 b' class dirstate(object):'
1279 or size == -2 # other parent
1279 or size == -2 # other parent
1280 or fn in copymap
1280 or fn in copymap
1281 ):
1281 ):
1282 madd(fn)
1282 if (stat.S_ISLNK(st.st_mode) and size != st.st_size):
1283 # issue6456: Size returned may be longer due to
1284 # encryption on EXT-4 fscrypt, undecided.
1285 ladd(fn)
1286 else:
1287 madd(fn)
1283 elif (
1288 elif (
1284 time != st[stat.ST_MTIME]
1289 time != st[stat.ST_MTIME]
1285 and time != st[stat.ST_MTIME] & _rangemask
1290 and time != st[stat.ST_MTIME] & _rangemask
General Comments 0
You need to be logged in to leave comments. Login now