From b10d16ccc01bd002b01fa1a2b77f973f54f37961 Mon Sep 17 00:00:00 2001 From: idl0r Date: Thu, 30 Apr 2009 15:06:15 +0000 Subject: [PATCH] Fixed git detection. svn path=/; revision=556 --- trunk/src/echangelog/echangelog | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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 -- 2.26.2