From c42b114fbe267c198472cc43e9b6ac612ea57144 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Sun, 12 Dec 2021 18:20:03 +0000 Subject: [PATCH] fix git describe for 2009 vintage git! --- Changes | 2 ++ perl/cluster.pl | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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+/; -- 2.43.0