Skip to content
  • Junio C Hamano's avatar
    git-repack: Be careful when updating the same pack as an existing one. · 2ad47d61
    Junio C Hamano authored
    
    
    After a clone, packfiles are read-only by default and "mv" to
    replace the pack with a new one goes interactive, asking if the
    user wants to replace it.  If one is successfully moved and the
    other is not, the pack and its idx would become out-of-sync and
    corrupts the repository.
    
    Recovering is straightforward -- it is just the matter of
    finding the remaining .tmp-pack-* and make sure they are both
    moved -- but we should be extra careful not to do something so
    alarming to the users.
    
    Signed-off-by: default avatarJunio C Hamano <junkio@cox.net>
    2ad47d61