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

Sandro Santilli strk at kbt.io
Wed Oct 16 10:28:41 PDT 2019


Author: strk
Date: 2019-10-16 22:28:41 -0700 (Wed, 16 Oct 2019)
New Revision: 17922

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

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

Modified: trunk/utils/svn_repo_revision.pl
===================================================================
--- trunk/utils/svn_repo_revision.pl	2019-10-17 05:21:16 UTC (rev 17921)
+++ trunk/utils/svn_repo_revision.pl	2019-10-17 05:28:41 UTC (rev 17922)
@@ -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