From a5ba11ab5c0bc6f42706ac38ed442b269ebb3e56 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Duke\" Leto" Date: Wed, 17 Nov 2010 08:43:41 -0800 Subject: [PATCH] [config] Make git-related config steps do nothing unless we are in a Git repo --- config/auto/git_describe.pm | 2 ++ config/auto/sha1.pm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/config/auto/git_describe.pm b/config/auto/git_describe.pm index 502587ab91..e795a44bd5 100644 --- a/config/auto/git_describe.pm +++ b/config/auto/git_describe.pm @@ -31,6 +31,8 @@ sub _init { sub runstep { my ( $self, $conf ) = @_; + return 1 unless -e '.git'; + my $describe = $Parrot::Git::Describe::current; if ( defined($describe) and $describe !~ /^REL(EASE)?_\d+_\d+_\d+(-\d+-g[0-9A-Fa-f]{7})?$/ ) { diff --git a/config/auto/sha1.pm b/config/auto/sha1.pm index c05fcd3758..9a716a63c2 100644 --- a/config/auto/sha1.pm +++ b/config/auto/sha1.pm @@ -30,6 +30,8 @@ sub _init { sub runstep { my ( $self, $conf ) = @_; + return 1 unless -e '.git'; + my $sha1 = $Parrot::SHA1::current; my $abbrev_sha1;