From d78b17adabb1880857c67fda40be0c47fe9d1866 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 4 Mar 2017 02:15:29 +0000 Subject: repobrowse: stop abbreviating object names Ending up with potentially ambiguous identifiers in the future is not worth saving some bytes, in this case. --- lib/PublicInbox/Git.pm | 5 ----- lib/PublicInbox/RepoGitAtom.pm | 3 +-- lib/PublicInbox/RepoGitSrc.pm | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/PublicInbox/Git.pm b/lib/PublicInbox/Git.pm index aba4616e..6a7b109f 100644 --- a/lib/PublicInbox/Git.pm +++ b/lib/PublicInbox/Git.pm @@ -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 diff --git a/lib/PublicInbox/RepoGitAtom.pm b/lib/PublicInbox/RepoGitAtom.pm index c2393b38..4b074fcc 100644 --- a/lib/PublicInbox/RepoGitAtom.pm +++ b/lib/PublicInbox/RepoGitAtom.pm @@ -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 ''; diff --git a/lib/PublicInbox/RepoGitSrc.pm b/lib/PublicInbox/RepoGitSrc.pm index 186d261f..67de86ee 100644 --- a/lib/PublicInbox/RepoGitSrc.pm +++ b/lib/PublicInbox/RepoGitSrc.pm @@ -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); -- cgit v1.2.3-24-ge0c7