diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-02-10 12:16:31 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-11 18:32:16 -0800 |
commit | 3e6b1d0abcd58f0b2b106212ce0a0e07a6de342f (patch) | |
tree | fdb5a3792a17a0279889d9b589dab58fc351bc82 /imap-send.c | |
parent | fast-export: ensure we traverse commits in topological order (diff) | |
download | tgif-3e6b1d0abcd58f0b2b106212ce0a0e07a6de342f.tar.xz |
Make repack less likely to corrupt repository
Some platforms refuse to rename a file that is open. When repacking an
already packed repository without adding any new object, the resulting
pack will contain the same set of objects as an existing pack, and on such
platforms, a newly created packfile cannot replace the existing one.
The logic detected this issue but did not try hard enough to recover from
it. Especially because the files that needs renaming come in pairs, there
potentially are different failure modes that one can be renamed but the
others cannot. Asking manual recovery to end users were error prone.
This patch tries to make it more robust by first making sure all the
existing files that need to be renamed have been renamed before
continuing, and attempts to roll back if some failed to rename.
This is based on an initial patch by Robin Rosenberg.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'imap-send.c')
0 files changed, 0 insertions, 0 deletions