From d0cc89ddb47f330df56d2595c59cff0efb64472e Mon Sep 17 00:00:00 2001 From: Yigang Wen Date: Mon, 8 Apr 2013 16:11:12 +0800 Subject: [PATCH] optimization: break recursion if .git directory exist without this patch, depanneur will scan all directory to find .git dir, acturally, that's not needed, if .git exist, all dirs, with same parent dir of .git, can be skipped. Change-Id: I934695924edb288d7b3f3a00570b7d6bd341c0ef --- depanneur | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/depanneur b/depanneur index 078c420..cffdfc5 100755 --- a/depanneur +++ b/depanneur @@ -439,7 +439,10 @@ if ( -d "$packaging_dir" && -d ".git" ) { } sub git_wanted { - fill_packs_from_git($name) if /^\.git\z/s && -d $_; + if( -d "$name/.git" ){ + fill_packs_from_git("$name/.git"); + $prune = 1; + } } sub obs_wanted { -- 2.7.4