about summary refs log tree commit homepage
path: root/lib/PublicInbox/Git.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2019-05-22 02:14:00 +0000
committerEric Wong <e@80x24.org>2019-05-22 02:14:29 +0000
commit97b45ccc7ae2f721744bd7ee1f1cbaab9e6df790 (patch)
tree590dadc6bf68b4d7d5f4ff3b699e34ef615c7eee /lib/PublicInbox/Git.pm
parent99566f264b4a13f5e9096411f1c87c4def153ab1 (diff)
downloadpublic-inbox-97b45ccc7ae2f721744bd7ee1f1cbaab9e6df790.tar.gz
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+
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r--lib/PublicInbox/Git.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm
index 236f70c1..a4daaa48 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;
         };
 }