diff options
author | Eric Wong <e@80x24.org> | 2022-09-02 10:11:48 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-09-02 17:40:08 +0000 |
commit | f521bf1ca5f779c3a18ff44f308ba318366ec7f5 (patch) | |
tree | bf9bfad538cbbacb1ecd9dcc7b6c1dc6c6578c25 | |
parent | 0d2dd565d44c068d641d25d6b4e8e2885af05a2d (diff) | |
download | public-inbox-f521bf1ca5f779c3a18ff44f308ba318366ec7f5.tar.gz |
We're considering duplicate patches from cross-posted lists identical, so don't double-count them when displaying the "applying [X/Y]" message since (successful) duplicates get skipped.
-rw-r--r-- | lib/PublicInbox/SolverGit.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/PublicInbox/SolverGit.pm b/lib/PublicInbox/SolverGit.pm index 610bd65b..ac655f34 100644 --- a/lib/PublicInbox/SolverGit.pm +++ b/lib/PublicInbox/SolverGit.pm @@ -486,15 +486,14 @@ sub do_git_apply ($) { my @cmd = (qw(git apply --cached --ignore-whitespace --unidiff-zero --whitespace=warn --verbose)); my $len = length(join(' ', @cmd)); - my $total = $self->{tot}; my $di; # keep track of the last one for "git ls-files" my $prv_oid_b; do { my $i = ++$self->{nr}; $di = shift @$patches; - dbg($self, "\napplying [$i/$total] " . di_url($self, $di) . - "\n" . $di->{hdr_lines}); + dbg($self, "\napplying [$i/$self->{nr_p}] " . + di_url($self, $di) . "\n" . $di->{hdr_lines}); my $path = $di->{n}; $len += length($path) + 1; push @cmd, $path; @@ -557,6 +556,7 @@ sub extract_diffs_done { unshift @{$self->{patches}}, @$diffs; dbg($self, "found $want->{oid_b} in " . join(" ||\n\t", map { di_url($self, $_) } @$diffs)); + ++$self->{nr_p}; # good, we can find a path to the oid we $want, now # lets see if we need to apply more patches: @@ -679,7 +679,7 @@ sub solve ($$$$$) { $self->{oid_want} = $oid_want; $self->{out} = $out; $self->{seen_oid} = {}; - $self->{tot} = 0; + $self->{tot} = $self->{nr_p} = 0; $self->{psgi_env} = $env; $self->{have_hints} = 1 if scalar keys %$hints; $self->{todo} = [ { %$hints, oid_b => $oid_want } ]; |