[postgis-tickets] r17924 - Fix svn revision fetching from git worktree

Sandro Santilli strk at kbt.io
Wed Oct 16 10:29:47 PDT 2019


Author: strk
Date: 2019-10-16 22:29:47 -0700 (Wed, 16 Oct 2019)
New Revision: 17924

Modified:
   branches/3.0/utils/svn_repo_revision.pl
Log:
Fix svn revision fetching from git worktree

For worktrees, .git is a file, not a directory

Modified: branches/3.0/utils/svn_repo_revision.pl
===================================================================
--- branches/3.0/utils/svn_repo_revision.pl	2019-10-17 05:29:35 UTC (rev 17923)
+++ branches/3.0/utils/svn_repo_revision.pl	2019-10-17 05:29:47 UTC (rev 17924)
@@ -14,7 +14,7 @@
 # Read the svn revision number
 my $svn_rev = &read_rev($target);
 
-# Write it 
+# Write it
 &write_defn($svn_rev);
 
 
@@ -30,7 +30,7 @@
     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 {



More information about the postgis-tickets mailing list