From: Eric Wong (Contractor, The Linux Foundation) Date: Wed, 18 Apr 2018 09:13:15 +0000 (+0000) Subject: use %H consistently to disable abbreviations X-Git-Tag: v1.1.0-pre1~26 X-Git-Url: http://www.git.stargrave.org/?p=public-inbox.git;a=commitdiff_plain;h=8b4ddc9c2c08cd085f5c4d5dfc019342dd53b570 use %H consistently to disable abbreviations We generally do not want git to waste time finding abbreviations and we do not want the possibility of them becoming ambiguous over time, either. --- diff --git a/lib/PublicInbox/Feed.pm b/lib/PublicInbox/Feed.pm index d7df07ee..b373a1eb 100644 --- a/lib/PublicInbox/Feed.pm +++ b/lib/PublicInbox/Feed.pm @@ -116,7 +116,7 @@ sub recent_msgs { my $log = $ibx->git->popen(qw/log --no-notes --no-color --raw -r --no-abbrev --abbrev-commit/, - "--format=%h", $range); + "--format=%H", $range); my %deleted; # only an optimization at this point my $last; my $last_commit; diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 2cc87305..1316d628 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -788,7 +788,7 @@ $range $ranges->[$i] = $range; # can't use 'rev-list --count' if we use --diff-filter - my $fh = $git->popen(qw(log --pretty=tformat:%h + my $fh = $git->popen(qw(log --pretty=tformat:%H --no-notes --no-color --no-renames --diff-filter=AM), $range, '--', 'm'); ++$regen_max while <$fh>; @@ -865,7 +865,7 @@ sub index_sync { my $regen = $self->index_prepare($opts, $epoch_max, $ranges); $$regen += $max if $max; my $D = {}; - my @cmd = qw(log --raw -r --pretty=tformat:%h + my @cmd = qw(log --raw -r --pretty=tformat:%H --no-notes --no-color --no-abbrev --no-renames); # work backwards through history