author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 27 Jul 2008 02:33:00 +0000 (21:33 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 27 Jul 2008 21:49:26 +0000 (14:49 -0700) | ||
commit | a08c53a119999df5b76e405195fa6c5e7d4b689f | |
tree | 9a0ada907449af7bed652532a6529a5158a5c509 | tree | snapshot |
parent | f5d600e2dd8721d7b9177f1c82fe54822d9f1d62 | commit | diff |
fsck: Don't require tmp_obj_ file names are 14 bytes in length
Not all temporary file creation routines will ensure 14 bytes are
used to generate the temporary file name. In C Git this may be
true, but alternate implementations such as jgit are not always
able to generate a temporary file name with a specific prefix and
also ensure the file name length is 14 bytes long.
Since temporary files in a directory we are fsck'ing should be
uncommon (as they are short lived only long enough for an active
writer to finish writing the file and rename it) we shouldn't see
these show up very often. Always using a prefixcmp() call and
ignoring the length opens up room for other implementations to use
different name generation schemes.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Not all temporary file creation routines will ensure 14 bytes are
used to generate the temporary file name. In C Git this may be
true, but alternate implementations such as jgit are not always
able to generate a temporary file name with a specific prefix and
also ensure the file name length is 14 bytes long.
Since temporary files in a directory we are fsck'ing should be
uncommon (as they are short lived only long enough for an active
writer to finish writing the file and rename it) we shouldn't see
these show up very often. Always using a prefixcmp() call and
ignoring the length opens up room for other implementations to use
different name generation schemes.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-fsck.c | diff | blob | history |