Skip to content

Refactor git diff handling#1779

Merged
prymitive merged 13 commits intomainfrom
diff
May 1, 2026
Merged

Refactor git diff handling#1779
prymitive merged 13 commits intomainfrom
diff

Conversation

@prymitive
Copy link
Copy Markdown
Collaborator

Stop using git blame for calculating modified lines, use git diff instead.
This allows us to drop fetching of diffs from reporter APIs.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request was validated by pint.

✔️ No problems found

Stats

Stat Value
Version v0.80.0-25-gc2cb012c
Number of rules parsed 9
Number of rules checked 9
Number of problems found 0
Number of offline checks 0
Number of online checks 0
Checks duration 0

Problems

No problems reported

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.46%. Comparing base (01e5c6c) to head (c2cb012).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1779      +/-   ##
==========================================
+ Coverage   99.44%   99.46%   +0.02%     
==========================================
  Files         113      113              
  Lines       13752    13739      -13     
==========================================
- Hits        13675    13665      -10     
+ Misses         42       40       -2     
+ Partials       35       34       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Benchmark diff:

goos: linux
goarch: amd64
pkg: github.com/cloudflare/pint/cmd/pint
cpu: Intel(R) Xeon(R) Platinum 8370C CPU @ 2.80GHz
                    │   old.txt   │              new.txt               │
                    │   sec/op    │   sec/op     vs base               │
GlobFinder-4          19.17m ± 5%   18.22m ± 2%  -4.94% (p=0.029 n=10)
GitFinder-4           300.5m ± 8%   277.7m ± 1%  -7.60% (p=0.019 n=10)
CheckRules-4           9.603 ± 1%    9.615 ± 1%       ~ (p=0.853 n=10)
RuleIsIdentical-4     4.496m ± 1%   4.498m ± 0%       ~ (p=0.579 n=10)
GetChecksForEntry-4   110.8m ± 1%   110.0m ± 1%       ~ (p=0.052 n=10)
geomean               122.5m        119.2m       -2.66%

                    │    old.txt     │                new.txt                │
                    │      B/op      │     B/op      vs base                 │
GlobFinder-4          7.151Mi ± 0%     7.342Mi ± 0%  +2.67% (p=0.000 n=10)
GitFinder-4           16.10Mi ± 1%     16.38Mi ± 1%  +1.75% (p=0.000 n=10)
CheckRules-4          899.8Mi ± 0%     899.4Mi ± 0%       ~ (p=0.631 n=10)
RuleIsIdentical-4       0.000 ± 0%       0.000 ± 0%       ~ (p=1.000 n=10) ¹
GetChecksForEntry-4   56.84Mi ± 0%     56.84Mi ± 0%  -0.00% (p=0.034 n=10)
geomean                            ²                 +0.87%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

                    │    old.txt    │               new.txt                │
                    │   allocs/op   │  allocs/op   vs base                 │
GlobFinder-4          111.1k ± 0%     111.2k ± 0%  +0.07% (p=0.000 n=10)
GitFinder-4           148.8k ± 0%     146.1k ± 0%  -1.76% (p=0.000 n=10)
CheckRules-4          9.775M ± 0%     9.770M ± 0%       ~ (p=0.089 n=10)
RuleIsIdentical-4      0.000 ± 0%      0.000 ± 0%       ~ (p=1.000 n=10) ¹
GetChecksForEntry-4   927.9k ± 0%     927.9k ± 0%  -0.00% (p=0.018 n=10)
geomean                           ²                -0.35%                ²
¹ all samples are equal
² summaries must be >0 to compute geomean

pkg: github.com/cloudflare/pint/internal/parser
        │   old.txt   │            new.txt            │
        │   sec/op    │   sec/op     vs base          │
Parse-4   15.55m ± 1%   15.52m ± 1%  ~ (p=0.579 n=10)

        │   old.txt    │            new.txt             │
        │     B/op     │     B/op      vs base          │
Parse-4   6.324Mi ± 0%   6.324Mi ± 0%  ~ (p=0.912 n=10)

        │   old.txt   │             new.txt             │
        │  allocs/op  │  allocs/op   vs base            │
Parse-4   102.8k ± 0%   102.8k ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

pkg: github.com/cloudflare/pint/internal/parser/source
               │   old.txt   │            new.txt            │
               │   sec/op    │   sec/op     vs base          │
LabelsSource-4   6.796m ± 1%   6.757m ± 2%  ~ (p=0.063 n=10)

               │   old.txt    │            new.txt             │
               │     B/op     │     B/op      vs base          │
LabelsSource-4   5.708Mi ± 0%   5.706Mi ± 0%  ~ (p=0.579 n=10)

               │   old.txt   │            new.txt            │
               │  allocs/op  │  allocs/op   vs base          │
LabelsSource-4   46.77k ± 0%   46.76k ± 0%  ~ (p=0.614 n=10)

pkg: github.com/cloudflare/pint/internal/promapi
                    │   old.txt    │              new.txt               │
                    │    sec/op    │   sec/op     vs base               │
QueryCacheOnlySet-4   100.65n ± 2%   98.30n ± 1%  -2.34% (p=0.002 n=10)

                    │  old.txt   │            new.txt             │
                    │    B/op    │    B/op     vs base            │
QueryCacheOnlySet-4   64.00 ± 0%   64.00 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

                    │  old.txt   │            new.txt             │
                    │ allocs/op  │ allocs/op   vs base            │
QueryCacheOnlySet-4   1.000 ± 0%   1.000 ± 0%  ~ (p=1.000 n=10) ¹
¹ all samples are equal

@prymitive prymitive merged commit 28a8a44 into main May 1, 2026
20 checks passed
@prymitive prymitive deleted the diff branch May 1, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants