From: idl0r Date: Thu, 30 Apr 2009 15:06:15 +0000 (-0000) Subject: Fixed git detection. X-Git-Tag: gentoolkit-0.2.4.3^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b10d16ccc01bd002b01fa1a2b77f973f54f37961;p=gentoolkit.git Fixed git detection. svn path=/; revision=556 --- diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog index 4b1f786..fea1af6 100755 --- a/trunk/src/echangelog/echangelog +++ b/trunk/src/echangelog/echangelog @@ -90,11 +90,16 @@ if ( -d "CVS" ) { $vcs = "cvs"; } elsif ( -d '.svn' ) { $vcs = "svn"; -} elsif ( -f '/usr/bin/git' and open GIT, "git rev-parse --git-dir |" ) { - $vcs = "git"; - close GIT; } else { - die "No CVS, .git, .svn directories found, what kind of repo is this?"; + if ( -x '/usr/bin/git' ) { + open(GIT, '-|', "git rev-parse --git-dir 2>/dev/null"); + $vcs = "git" if defined(); + close(GIT); + } + + if ( ! $vcs ) { + die "No CVS, .git, .svn directories found, what kind of repo is this?"; + } } # Read the current ChangeLog