From: Dirk Koopman Date: Sun, 12 Dec 2021 18:20:03 +0000 (+0000) Subject: fix git describe for 2009 vintage git! X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=c42b114fbe267c198472cc43e9b6ac612ea57144;p=spider.git fix git describe for 2009 vintage git! --- diff --git a/Changes b/Changes index a883fa66..c2d65cd8 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,5 @@ +12Dec21======================================================================= +1. fix git describe et al AGAIN to cope with (very) old (2009) git versions. 11Dec21======================================================================= 1. Removed dependency on perl Git package. 2. Fixed errors caused by change 1 (use git -C $root to force .git location). diff --git a/perl/cluster.pl b/perl/cluster.pl index 7436c874..b544d7de 100755 --- a/perl/cluster.pl +++ b/perl/cluster.pl @@ -407,7 +407,7 @@ if (DXSql::init($dsn)) { # determine the real Git build number and branch my $desc; - eval {$desc = `git -C $root describe --long`}; + eval {$desc = `git --git-dir=$root/.git describe --long`}; if (!$@ && $desc) { my ($v, $s, $b, $g) = $desc =~ /^([\d\.]+)(?:\.(\d+))?-(\d+)-g([0-9a-f]+)/; $version = $v; @@ -418,7 +418,7 @@ if (DXSql::init($dsn)) { if (!$@) { my @branch; - eval {@branch = `git -C $root branch`}; + eval {@branch = `git --git-dir=$root/.git branch`}; unless ($@) { for (@branch) { my ($star, $b) = split /\s+/;