@ -921,8 +921,8 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
return false ;
return false ;
} else {
} else {
if ( mode = = FileMode . SYMLINK . getBits ( ) )
if ( mode = = FileMode . SYMLINK . getBits ( ) )
return ! new File ( readContentAsString ( current ( ) ) )
return ! new File ( readContentAsNormalized String ( current ( ) ) )
. equals ( new File ( readContentAsString ( entry ) ) ) ;
. equals ( new File ( ( readContentAsNormalized String ( entry ) ) ) ) ;
// Content differs: that's a real change, perhaps
// Content differs: that's a real change, perhaps
if ( reader = = null ) // deprecated use, do no further checks
if ( reader = = null ) // deprecated use, do no further checks
return true ;
return true ;
@ -971,19 +971,19 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
}
}
}
}
private String readContentAsString ( DirCacheEntry entry )
private String readContentAsNormalized String ( DirCacheEntry entry )
throws MissingObjectException , IOException {
throws MissingObjectException , IOException {
ObjectLoader open = repository . open ( entry . getObjectId ( ) ) ;
ObjectLoader open = repository . open ( entry . getObjectId ( ) ) ;
byte [ ] cachedBytes = open . getCachedBytes ( ) ;
byte [ ] cachedBytes = open . getCachedBytes ( ) ;
return RawParseUtils . decode ( cachedBytes ) ;
return FS . detect ( ) . normalize ( RawParseUtils . decode ( cachedBytes ) ) ;
}
}
private static String readContentAsString ( Entry entry ) throws IOException {
private static String readContentAsNormalized String ( Entry entry ) throws IOException {
long length = entry . getLength ( ) ;
long length = entry . getLength ( ) ;
byte [ ] content = new byte [ ( int ) length ] ;
byte [ ] content = new byte [ ( int ) length ] ;
InputStream is = entry . openInputStream ( ) ;
InputStream is = entry . openInputStream ( ) ;
IO . readFully ( is , content , 0 , ( int ) length ) ;
IO . readFully ( is , content , 0 , ( int ) length ) ;
return RawParseUtils . decode ( content ) ;
return FS . detect ( ) . normalize ( RawParseUtils . decode ( content ) ) ;
}
}
private long computeLength ( InputStream in ) throws IOException {
private long computeLength ( InputStream in ) throws IOException {