summaryrefslogtreecommitdiff
path: root/contrib/buildsystems
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-07-29 20:08:04 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-07-29 21:51:42 (GMT)
commite88919bfe285965bf99e3302a90187ba6f117be6 (patch)
tree4f81914d1737b2841f8c5cc4d3b79d67699a2491 /contrib/buildsystems
parent865406bc5426d5196935e37a3a5fde9c843c3e96 (diff)
downloadgit-e88919bfe285965bf99e3302a90187ba6f117be6.zip
git-e88919bfe285965bf99e3302a90187ba6f117be6.tar.gz
git-e88919bfe285965bf99e3302a90187ba6f117be6.tar.bz2
contrib/buildsystems: ignore irrelevant files in Generators/
The Generators/ directory can contain spurious files such as editors' backup files. Even worse, there could be .swp files which are not even valid Perl scripts. Let's just ignore anything but .pm files in said directory. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/buildsystems')
-rw-r--r--contrib/buildsystems/Generators.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/buildsystems/Generators.pm b/contrib/buildsystems/Generators.pm
index 408ef71..aa4cbaa 100644
--- a/contrib/buildsystems/Generators.pm
+++ b/contrib/buildsystems/Generators.pm
@@ -17,7 +17,7 @@ BEGIN {
$me = dirname($me);
if (opendir(D,"$me/Generators")) {
foreach my $gen (readdir(D)) {
- next if ($gen =~ /^\.\.?$/);
+ next unless ($gen =~ /\.pm$/);
require "${me}/Generators/$gen";
$gen =~ s,\.pm,,;
push(@AVAILABLE, $gen);