git < 2.5.0 was missing --git-path support.  This means any
users relying on some rare environment variables will need git
2.5.0+
---
 lib/PublicInbox/Git.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 236f70c..a4daaa4 100644
--- a/lib/PublicInbox/Git.pm
+++ b/lib/PublicInbox/Git.pm
@@ -59,6 +59,11 @@ sub git_path ($$) {
        $self->{-git_path}->{$path} ||= do {
                local $/ = "\n";
                chomp(my $str = $self->qx(qw(rev-parse --git-path), $path));
+
+               # git prior to 2.5.0 did not understand --git-path
+               if ($str eq "--git-path\n$path") {
+                       $str = "$self->{git_dir}/$path";
+               }
                $str;
        };
 }
-- 
EW

--
unsubscribe: [email protected]
archive: https://public-inbox.org/meta/

Reply via email to