• Jeff King's avatar
    fsck: warn about '.' and '..' in trees · 5d34a435
    Jeff King authored
    A tree with meta-paths like '.' or '..' does not work well
    with git; the index will refuse to load it or check it out
    to the filesystem (and even if we did not have that safety,
    it would look like we were overwriting an untracked
    directory). For the same reason, it is difficult to create
    such a tree with regular git.
    
    Let's warn about these dubious entries during fsck, just in
    case somebody has created a bogus tree (and this also lets
    us prevent them from propagating when transfer.fsckObjects
    is set).
    Signed-off-by: default avatarJeff King <[email protected]>
    Signed-off-by: default avatarJunio C Hamano <[email protected]>
    5d34a435
fsck.c 9.98 KB