Permalink
Browse files

[config] Make git-related config steps do nothing unless we are in a …

…Git repo
  • Loading branch information...
1 parent 80d156e commit 7240365cbf1ac9709f17f72b949d09b83b468027 @leto leto committed with moritz Nov 17, 2010
Showing with 4 additions and 0 deletions.
  1. +2 −0 config/auto/git_describe.pm
  2. +2 −0 config/auto/sha1.pm
View
2 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})?$/ ) {
View
2 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;

0 comments on commit 7240365

Please sign in to comment.