diff options
author | Eric Wong <e@80x24.org> | 2021-11-10 02:39:00 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-11-10 09:05:56 +0000 |
commit | a34e62ec1d84eafb67cc63532a383d15a18dcc4d (patch) | |
tree | 92f3320340001e4135a260f6f3f8c639e2141102 /lib/PublicInbox/Git.pm | |
parent | f349c77a421ef1082eb0b22e8f71304df610fa6b (diff) | |
download | public-inbox-a34e62ec1d84eafb67cc63532a383d15a18dcc4d.tar.gz |
Tested manually on a newish project I'm working on.
Diffstat (limited to 'lib/PublicInbox/Git.pm')
-rw-r--r-- | lib/PublicInbox/Git.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index 309f80db..54ceaf0b 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -94,6 +94,13 @@ sub alternates_changed { $self->{alt_st} = $st; # always a true value } +sub object_format { + $_[0]->{object_format} //= do { + my $fmt = $_[0]->qx(qw(config extensions.objectformat)); + $fmt eq "sha256\n" ? \'sha256' : \undef; + } +} + sub last_check_err { my ($self) = @_; my $fh = $self->{err_c} or return; |