diff options
author | Eric Wong <e@80x24.org> | 2019-05-22 02:14:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-05-22 02:14:29 +0000 |
commit | 97b45ccc7ae2f721744bd7ee1f1cbaab9e6df790 (patch) | |
tree | 590dadc6bf68b4d7d5f4ff3b699e34ef615c7eee /lib/PublicInbox/Git.pm | |
parent | 99566f264b4a13f5e9096411f1c87c4def153ab1 (diff) | |
download | public-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.pm | 5 |
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; }; } |