]> Sergey Matveev's repositories - public-inbox.git/commitdiff
use %H consistently to disable abbreviations
authorEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Wed, 18 Apr 2018 09:13:15 +0000 (09:13 +0000)
committerEric Wong (Contractor, The Linux Foundation) <e@80x24.org>
Wed, 18 Apr 2018 09:14:19 +0000 (09:14 +0000)
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.

lib/PublicInbox/Feed.pm
lib/PublicInbox/V2Writable.pm

index d7df07ee9c4577a1d15fe5410f68e6bdd68ee3e2..b373a1ebc83dd99b7467456ce28eba03fb47b26a 100644 (file)
@@ -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;
index 2cc87305668256709f773415f750e5f52653503c..1316d628491f576c0096b3be215826d94e03aae9 100644 (file)
@@ -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