Skip to content
  • Junio C Hamano's avatar
    attr.c: read .gitattributes from index as well. · 1a9d7e9b
    Junio C Hamano authored
    
    
    This makes .gitattributes files to be read from the index when
    they are not checked out to the work tree.  This is in line with
    the way we always allowed low-level tools to operate in sparsely
    checked out work tree in a reasonable way.
    
    It swaps the order of new file creation and converting the blob
    to work tree representation; otherwise when we are in the middle
    of checking out .gitattributes we would notice an empty but
    unwritten .gitattributes file in the work tree and will ignore
    the copy in the index.
    
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    1a9d7e9b