diff options
| author | idl0r <idl0r@gentoo.org> | 2009-04-30 15:06:15 +0000 |
|---|---|---|
| committer | idl0r <idl0r@gentoo.org> | 2009-04-30 15:06:15 +0000 |
| commit | b10d16ccc01bd002b01fa1a2b77f973f54f37961 (patch) | |
| tree | b056b9f1ef0a4c9b1214a84c63907cbda9f08c35 | |
| parent | 1e675d026260a459a983cfa6299336cefeef39c7 (diff) | |
| download | gentoolkit-b10d16ccc01bd002b01fa1a2b77f973f54f37961.tar.gz | |
Fixed git detection.
svn path=/; revision=556
| -rwxr-xr-x | trunk/src/echangelog/echangelog | 13 |
1 files 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(<GIT>); + close(GIT); + } + + if ( ! $vcs ) { + die "No CVS, .git, .svn directories found, what kind of repo is this?"; + } } # Read the current ChangeLog |
