]> Sergey Matveev's repositories - public-inbox.git/blobdiff - lib/PublicInbox/Git.pm
solver: support sha256 coderepos
[public-inbox.git] / lib / PublicInbox / Git.pm
index 309f80dbfcf001e51f130cddee1a14ee38303dd3..54ceaf0b8a5d6935f9101dbf52a45c4155eeb90f 100644 (file)
@@ -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;