From 30f09e282d7b527ae31a1b2516b00d31a099823b Mon Sep 17 00:00:00 2001 From: Christopher Vagnetoft Date: Tue, 10 Jan 2017 15:16:36 +0100 Subject: [PATCH] Added filter for .git directories --- src/MakePhar/Manifest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/MakePhar/Manifest.php b/src/MakePhar/Manifest.php index d154474..2f478ae 100644 --- a/src/MakePhar/Manifest.php +++ b/src/MakePhar/Manifest.php @@ -198,6 +198,10 @@ class Manifest log_warn("Unsupported source type: %s", $source->type); } } + $items = array_filter($items, function ($item) { + if (fnmatch("*/.git/*", $item->src)) return false; + return true; + }); return $items; }