Skip to content

Commit be4ca29

Browse files
novalisgitster
authored andcommitted
Increase core.packedGitLimit
When core.packedGitLimit is exceeded, git will close packs. If there is a repack operation going on in parallel with a fetch, the fetch might open a pack, and then be forced to close it due to packedGitLimit being hit. The repack could then delete the pack out from under the fetch, causing the fetch to fail. Increase core.packedGitLimit's default value to prevent this. On current 64-bit x86_64 machines, 48 bits of address space are available. It appears that 64-bit ARM machines have no standard amount of address space (that is, it varies by manufacturer), and IA64 and POWER machines have the full 64 bits. So 48 bits is the only limit that we can reasonably care about. We reserve a few bits of the 48-bit address space for the kernel's use (this is not strictly necessary, but it's better to be safe), and use up to the remaining 45. No git repository will be anywhere near this large any time soon, so this should prevent the failure. Helped-by: Jeff King <[email protected]> Signed-off-by: David Turner <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6a2c2f8 commit be4ca29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

git-compat-util.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ extern int git_lstat(const char *, struct stat *);
616616
#endif
617617

618618
#define DEFAULT_PACKED_GIT_LIMIT \
619-
((1024L * 1024L) * (size_t)(sizeof(void*) >= 8 ? 8192 : 256))
619+
((1024L * 1024L) * (size_t)(sizeof(void*) >= 8 ? (32 * 1024L * 1024L) : 256))
620620

621621
#ifdef NO_PREAD
622622
#define pread git_pread

0 commit comments

Comments
 (0)