Skip to content
  • Junio C Hamano's avatar
    Do not take mode bits from index after type change. · 185c975f
    Junio C Hamano authored
    
    
    When we do not trust executable bit from lstat(2), we copied
    existing ce_mode bits without checking if the filesystem object
    is a regular file (which is the only thing we apply the "trust
    executable bit" business) nor if the blob in the index is a
    regular file (otherwise, we should do the same as registering a
    new regular file, which is to default non-executable).
    
    Noticed by Johannes Sixt.
    
    Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
    185c975f