Code

Work around EMFILE when there are too many pack files
authorShawn O. Pearce <spearce@spearce.org>
Mon, 1 Nov 2010 22:54:21 +0000 (15:54 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 3 Nov 2010 17:21:46 +0000 (10:21 -0700)
commitf2e872aa5eeb74f429632e14d0f7fa2ed828b65a
treea48040f83b9df9773cb87b0b67736e8a3cac9f36
parent4865d2b6622bd95fc07fea06916eeddf3e13e29b
Work around EMFILE when there are too many pack files

When opening any files in the object database, release unused pack
windows if the open(2) syscall fails due to EMFILE (too many open
files in this process).  This allows Git to degrade gracefully on
a repository with thousands of pack files, and a commit stored in
a loose object in the middle of the history.

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