From: Linus Torvalds Date: Thu, 11 Dec 2008 03:44:37 +0000 (-0800) Subject: fsck: reduce stack footprint X-Git-Tag: v1.6.1-rc3~6^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/04d39759373e5de017e7c17ef4b762ac5ad3afcc?hp=04d39759373e5de017e7c17ef4b762ac5ad3afcc fsck: reduce stack footprint The logic to mark all objects that are reachable from tips of refs were implemented as a set of recursive functions. In a repository with a deep enough history, this can easily eat up all the available stack space. Restructure the code to require less stackspace by using an object array to keep track of the objects that still need to be processed. Signed-off-by: Linus Torvalds Signed-off-by: Junio C Hamano ---