GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — refactor: save a git call when the author is on ignore_authors by shenxianpeng · Pull Request #694 · commit-check/commit-check

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Before: since #692, an author check that gets no message asks git whether a commit exists before it reads ignore_authors. An author on the list costs one git command more than in 2.20.4. Git commands run by commit-check --author-name (from GIT_TRACE) when the last commit is by dependabot[bot], who is on the list:

git rev-parse --git-dir
git rev-parse --verify HEAD
git log -n 1 '--pretty=format:%an' HEAD
⊘ skipped (not validated): author-name

CodSpeed reported two author benchmarks 18% slower on #692; both ran this extra lookup.

After: the same two commands as 2.20.4.

git rev-parse --git-dir
git log -n 1 '--pretty=format:%an' HEAD
⊘ skipped (not validated): author-name

How

  • AuthorValidator.validate reads ignore_authors first again and looks up whether a commit exists only when the list said no. In a repository with no commits it then asks the list a second time about the identity the first commit will carry, so what fix: check the first commit's author, name author.* in the CC017 advice #692 fixed stays fixed.
  • test_get_author_value_with_email_format mocks git but ran the commit lookup against the real repository. It now passes has_head=True, so nothing is looked up. Patching the lookup instead was slower than the git call by CodSpeed's count (callgrind, per run: 1.47M instructions on main, 1.92M with the extra patch, 1.26M with has_head=True).
  • No change in results. Across the whole suite these two tests are the only ones whose git command count changes (1 to 0); coverage stays at 100%.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shenxianpeng
refactor: save a git call when the author is on ignore_authors
2361655
The author checks asked git whether a commit exists before they read
ignore_authors, so an author on the list cost one `git rev-parse` more
than in 2.20.4. Read the list first again, and look the commit up only
when the list said no; a repository with no commits then asks the list
a second time about the identity the first commit will carry.

One test of the fallback to the last commit's author ran that lookup
against the real repository. It now patches it like the other git calls.
@shenxianpeng
shenxianpeng requested a review from a team as a code owner November 11, 2026 05:10
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

  • X
  • Mastodon
  • Reddit
  • LinkedIn
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the chore label Nov 11, 2026
@shenxianpeng shenxianpeng added refactor Refactor source code and removed chore labels Nov 11, 2026 — with Claude
@codecov

codecov Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (079bb74) to head (5305273).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #694   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           15        15           
  Lines         2598      2600    +2     
  Branches       507       508    +1     
=========================================
+ Hits          2598      2600    +2     

☔ View full report in Codecov by Harness.
📢 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@codspeed

codspeed Bot commented Nov 11, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Merging this PR will improve performance by 27.34%

2 warnings

⚠️ 133 benchmarks are dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

⚠️ 4 benchmarks with a significant change ran on different hardware

Their base and head results were measured on machines with a different CPU, core count or memory, so the changes might not come from the code. Run base and head on the same runner type.

Learn more about Macro Runners

See affected benchmarks

⚡ 4 improved benchmarks
✅ 681 untouched benchmarks
⏩ 131 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ test_docs_url_points_at_the_published_site 313.4 µs 206.9 µs +51.47%
⚡ test_author_validator_ignored_author 2.4 ms 1.9 ms +24.12%
⚡ test_get_author_value_with_email_format 2.5 ms 2.1 ms +22.57%
⚡ test_docs_url_derives_from_id 284.6 µs 249.5 µs +14.1%

Tip

Curious why performance improved? Comment @codspeedbot explain why performance improved on this PR, or directly use the CodSpeed MCP with your agent.


Comparing claude/project-thread-pofwgp (5305273) with main (079bb74)

Open in CodSpeed

Footnotes

  1. 131 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng
test: pass has_head instead of patching the commit lookup
5305273
Patching has_commits in the fallback test built a mock that costs more
than the git call it replaced, by CodSpeed's count. The test now tells
_get_author_value that a commit exists, so nothing is looked up.
@github-actions github-actions Bot added the chore label Nov 11, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 11, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng shenxianpeng removed the refactor Refactor source code label Nov 11, 2026 — with Claude
@shenxianpeng
shenxianpeng merged commit c5904d6 into main Nov 11, 2026
33 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@shenxianpeng
shenxianpeng deleted the claude/project-thread-pofwgp branch November 11, 2026 05:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

chore

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@shenxianpeng
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.