author | Nicolas Pitre <nico@cam.org> | |
Tue, 9 Dec 2008 19:26:52 +0000 (14:26 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Thu, 11 Dec 2008 01:56:05 +0000 (17:56 -0800) | ||
commit | c74faea19e39ca933492f697596310397175c329 | |
tree | 8d98539f02bf7bcc82c43f466feae01dbf0de9bc | tree | snapshot |
parent | aa971cb9bf4105eefb435b9e6f282f019529c35f | commit | diff |
make sure packs to be replaced are closed beforehand
Especially on Windows where an opened file cannot be replaced, make
sure pack-objects always close packs it is about to replace. Even on
non Windows systems, this could save potential bad results if ever
objects were to be read from the new pack file using offset from the old
index.
This should fix t5303 on Windows.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Tested-by: Johannes Sixt <j6t@kdbg.org> (MinGW)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Especially on Windows where an opened file cannot be replaced, make
sure pack-objects always close packs it is about to replace. Even on
non Windows systems, this could save potential bad results if ever
objects were to be read from the new pack file using offset from the old
index.
This should fix t5303 on Windows.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Tested-by: Johannes Sixt <j6t@kdbg.org> (MinGW)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-pack-objects.c | diff | blob | history | |
cache.h | diff | blob | history | |
sha1_file.c | diff | blob | history |