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

Sandro Santilli strk at kbt.io
Thu Oct 17 04:24:47 PDT 2019


Author: strk
Date: 2019-10-17 04:24:47 -0700 (Thu, 17 Oct 2019)
New Revision: 17932

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

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

Modified: branches/2.4/utils/svn_repo_revision.pl
===================================================================
--- branches/2.4/utils/svn_repo_revision.pl	2019-10-17 11:23:15 UTC (rev 17931)
+++ branches/2.4/utils/svn_repo_revision.pl	2019-10-17 11:24:47 UTC (rev 17932)
@@ -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