]> Sergey Matveev's repositories - public-inbox.git/commitdiff
git: disable abbreviations with cat-file hints
authorEric Wong <e@80x24.org>
Fri, 18 Jan 2019 06:09:24 +0000 (06:09 +0000)
committerEric Wong <e@80x24.org>
Sat, 19 Jan 2019 03:34:54 +0000 (03:34 +0000)
Ambiguity is not worth it for internal usage with the
solver.

lib/PublicInbox/Git.pm

index a61cb31b7f903bd1252badaf7cb15eadddf09ed9..b655921b00f06e1ef3be428901b1919abe2fbeba 100644 (file)
@@ -92,7 +92,8 @@ sub _bidi_pipe {
                fcntl($in_w, 1031, 4096) if $batch eq '--batch-check';
        }
 
-       my @cmd = ('git', "--git-dir=$self->{git_dir}", qw(cat-file), $batch);
+       my @cmd = (qw(git), "--git-dir=$self->{git_dir}",
+                       qw(-c core.abbrev=40 cat-file), $batch);
        my $redir = { 0 => fileno($out_r), 1 => fileno($in_w) };
        if ($err) {
                open(my $fh, '+>', undef) or fail($self, "open.err failed: $!");