]> Sergey Matveev's repositories - public-inbox.git/commitdiff
v2writable: use "HEAD" to match v1 indexing behavior
authorEric Wong <e@80x24.org>
Tue, 29 Sep 2020 19:43:50 +0000 (19:43 +0000)
committerEric Wong <e@80x24.org>
Wed, 30 Sep 2020 07:55:56 +0000 (07:55 +0000)
Users may want to change the default branch used for git epochs
in v2 (v1 SearchIdx always used whatever "HEAD" pointed to).

lib/PublicInbox/V2Writable.pm

index 5ff2af1035600e079888820fe65b58b1c71be71c..534cd7dcd8913869a8cfa36a53a021d29ac9bf7c 100644 (file)
@@ -1030,7 +1030,7 @@ sub sync_prepare ($$$) {
        my ($self, $sync, $epoch_max) = @_;
        my $pr = $sync->{-opt}->{-progress};
        my $regen_max = 0;
-       my $head = $self->{ibx}->{ref_head} || 'refs/heads/master';
+       my $head = $self->{ibx}->{ref_head} || 'HEAD';
 
        # reindex stops at the current heads and we later rerun index_sync
        # without {reindex}