]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
repobrowse: stop abbreviating object names
authorEric Wong <e@80x24.org>
Sat, 4 Mar 2017 02:15:29 +0000 (02:15 +0000)
committerEric Wong <e@80x24.org>
Sat, 4 Mar 2017 02:15:29 +0000 (02:15 +0000)
Ending up with potentially ambiguous identifiers in the
future is not worth saving some bytes, in this case.

lib/PublicInbox/Git.pm
lib/PublicInbox/RepoGitAtom.pm
lib/PublicInbox/RepoGitSrc.pm

index aba4616e3ec8bd2ff3f1b504372b1a6784576c13..6a7b109f11d7deb0a1f7f90e3551f87772c22bb3 100644 (file)
@@ -18,11 +18,6 @@ my $have_async = eval {
        require PublicInbox::GitAsync;
 };
 
-# Documentation/SubmittingPatches recommends 12 (Linux v4.4)
-my $abbrev = `git config core.abbrev` || 12;
-
-sub abbrev { "--abbrev=$abbrev" }
-
 sub new {
        my ($class, $git_dir) = @_;
        bless { git_dir => $git_dir }, $class
index c2393b38b57d4b0f99ab2f1902a808b0c10dbaa4..4b074fcc79834415c5b5929f7ab4a40dbed0d41a 100644 (file)
@@ -142,8 +142,7 @@ sub call_git_atom {
        my $env = $req->{env};
        my $tip = $req->{tip} || $repo->tip;
        my $read_log = sub {
-               my $cmd = $git->cmd(qw(log --no-notes --no-color
-                                       --abbrev-commit), $git->abbrev,
+               my $cmd = $git->cmd(qw(log --no-notes --no-color --no-abbrev),
                                        $ATOM_FMT, "-$max", $tip, '--');
                my $expath = $req->{expath};
                push @$cmd, $expath if $expath ne '';
index 186d261f64f87a87de36838728c5284c4f23e1ab..67de86ee8888063cd4e86b31569489c8e99f42a5 100644 (file)
@@ -214,7 +214,7 @@ sub git_tree_sed ($) {
 sub git_tree_show {
        my ($self, $req, $res, $hex) = @_;
        my $git = $req->{-repo}->{git};
-       my $cmd = $git->cmd(qw(ls-tree -l -z), $git->abbrev, $hex);
+       my $cmd = $git->cmd(qw(ls-tree -l -z --no-abbrev), $hex);
        my $rdr = { 2 => $git->err_begin };
        my $qsp = PublicInbox::Qspawn->new($cmd, undef, $rdr);
        my $t = cur_path($req);