From: Sandro Santilli Date: Thu, 17 Oct 2019 05:28:41 +0000 (+0000) Subject: Fix svn revision fetching from git worktree X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=09e5b0c98a23a007e1517eb34cff983a9128114f;p=postgis Fix svn revision fetching from git worktree For worktrees, .git is a file, not a directory git-svn-id: http://svn.osgeo.org/postgis/trunk@17922 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/utils/svn_repo_revision.pl b/utils/svn_repo_revision.pl index add006981..ed20f480d 100755 --- a/utils/svn_repo_revision.pl +++ b/utils/svn_repo_revision.pl @@ -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 {