1 |
Author: idl0r |
2 |
Date: 2009-04-30 15:06:15 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 556 |
4 |
|
5 |
Modified: |
6 |
trunk/src/echangelog/echangelog |
7 |
Log: |
8 |
Fixed git detection. |
9 |
|
10 |
|
11 |
Modified: trunk/src/echangelog/echangelog |
12 |
=================================================================== |
13 |
--- trunk/src/echangelog/echangelog 2009-04-30 14:22:10 UTC (rev 555) |
14 |
+++ trunk/src/echangelog/echangelog 2009-04-30 15:06:15 UTC (rev 556) |
15 |
@@ -90,11 +90,16 @@ |
16 |
$vcs = "cvs"; |
17 |
} elsif ( -d '.svn' ) { |
18 |
$vcs = "svn"; |
19 |
-} elsif ( -f '/usr/bin/git' and open GIT, "git rev-parse --git-dir |" ) { |
20 |
- $vcs = "git"; |
21 |
- close GIT; |
22 |
} else { |
23 |
- die "No CVS, .git, .svn directories found, what kind of repo is this?"; |
24 |
+ if ( -x '/usr/bin/git' ) { |
25 |
+ open(GIT, '-|', "git rev-parse --git-dir 2>/dev/null"); |
26 |
+ $vcs = "git" if defined(<GIT>); |
27 |
+ close(GIT); |
28 |
+ } |
29 |
+ |
30 |
+ if ( ! $vcs ) { |
31 |
+ die "No CVS, .git, .svn directories found, what kind of repo is this?"; |
32 |
+ } |
33 |
} |
34 |
|
35 |
# Read the current ChangeLog |