Code

sha1_file.c: Don't retain open fds on small packs
authorShawn O. Pearce <spearce@spearce.org>
Wed, 2 Mar 2011 18:01:54 +0000 (10:01 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Mar 2011 19:25:30 +0000 (11:25 -0800)
commitd131b7afea58f47721dafd013ab6aff4adfc42dd
treeeba3c5c258ff6408d15170e03cf005ff40bceed8
parent38abd9b8b4e11aa0b4cdaa5c7b44e0c0ad06820b
sha1_file.c: Don't retain open fds on small packs

If a pack file is small enough that its entire contents fits within
one mmap window, mmap the file and then immediately close its file
descriptor.  This reduces the number of file descriptors that are
needed to read from repositories with many tiny pack files, such
as one that has received 1000 pushes (and created 1000 small pack
files) since its last repack.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
fast-import.c
sha1_file.c