Skip to content
  • Jeff King's avatar
    verify_dotfile(): reject .git case-insensitively · cc2fc7c2
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    We do not allow ".git" to enter into the index as a path
    component, because checking out the result to the working
    tree may causes confusion for subsequent git commands.
    However, on case-insensitive file systems, ".Git" or ".GIT"
    is the same. We should catch and prevent those, too.
    
    Note that technically we could allow this for repos on
    case-sensitive filesystems. But there's not much point. It's
    unlikely that anybody cares, and it creates a repository
    that is unexpectedly non-portable to other systems.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    cc2fc7c2