]> granicus.if.org Git - postgis/commitdiff
Fix svn revision fetching from git worktree
authorSandro Santilli <strk@kbt.io>
Thu, 17 Oct 2019 05:28:41 +0000 (05:28 +0000)
committerSandro Santilli <strk@kbt.io>
Thu, 17 Oct 2019 05:28:41 +0000 (05:28 +0000)
For worktrees, .git is a file, not a directory

git-svn-id: http://svn.osgeo.org/postgis/trunk@17922 b70326c6-7e19-0410-871a-916f4a2858ee

utils/svn_repo_revision.pl

index add006981e4022a0d10857c12ce96bda8ec2cc2e..ed20f480d4efdac2984e1c2eca9b1902ebbe9a99 100755 (executable)
@@ -14,7 +14,7 @@ $target = $ARGV[0] if $ARGV[0];
 # Read the svn revision number
 my $svn_rev = &read_rev($target);
 
-# Write it 
+# Write it
 &write_defn($svn_rev);
 
 
@@ -30,7 +30,7 @@ sub read_rev {
     if ( -d $top_srcdir."/.svn" ) {
       #print STDERR "There's a ". $top_srcdir."/.svn dir\n";
       $svn_info  = &read_rev_svn($target);
-    } elsif ( -d $top_srcdir."/.git" ) {
+    } elsif ( -e $top_srcdir."/.git" ) {
       #print STDERR "There's a ". $top_srcdir."/.git dir\n";
       $svn_info  = &read_rev_git();
     } else {