| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Codecov Report❌ Patch coverage is 95.09804% with 10 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## master #2725 +/- ##
========================================
Coverage 94.19% 94.19%
========================================
Files 142 143 +1
Lines 30292 30496 +204
========================================
+ Hits 28534 28727 +193
- Misses 1758 1769 +11 ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Here are some automated review suggestions for this pull request.
Reviewed commit: bc8f15d75f
ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Sorry, something went wrong.
| .arg("--no-merges") | ||
| .arg("-z") | ||
| .arg("--pretty=format:%h\u{1f}%G?\u{1f}%s") | ||
| .arg(range) |
There was a problem hiding this comment.
Check every ref in a multi-ref push
When one git push updates multiple refs, Git supplies one pre-push input line per ref, but parse_pre_push_info in crates/prek/src/cli/hook_impl.rs returns after selecting the first applicable line and exposes only that single range through these environment variables. Consequently, this git log checks only the first selected ref, so an unsigned commit reachable exclusively from a later branch or tag is pushed without inspection. The pre-push plumbing needs to retain all pushed ranges, and this hook must inspect each of them.
Useful? React with 👍 / 👎.
Sorry, something went wrong.
There was a problem hiding this comment.
Ho good point! but it's an infrastructure gap, not something scoped to this PR's file, I could do another PR if you want
Sorry, something went wrong.
📦 Cargo Bloat Comparison.text size change: +3.25% (12.3 MiB → 12.7 MiB) Expand for cargo-bloat outputHead Branch ResultsFile .text Size Crate Name
0.1% 2.6% 332.0KiB aws_lc_sys aws_lc_0_45_0_aes_gcm_encrypt_avx512
0.1% 2.6% 332.0KiB aws_lc_sys aws_lc_0_45_0_aes_gcm_decrypt_avx512
0.0% 0.7% 96.5KiB prek <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
0.0% 0.4% 50.1KiB prek <<prek::config::hook::HookWire as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<&mut <serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
0.0% 0.4% 48.7KiB annotate_snippets annotate_snippets::renderer::render::render
0.0% 0.3% 44.7KiB prek prek::run::{closure#0}
0.0% 0.3% 43.9KiB prek <<prek::config::Config as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<&mut <serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
0.0% 0.3% 40.3KiB prek <prek::cli::RunOptions as clap_builder::derive::Args>::augment_args
0.0% 0.3% 35.5KiB prek prek::cli::run::run::run::{closure#0}
0.0% 0.2% 28.8KiB serde_saphyr <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
0.0% 0.2% 28.5KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 28.4KiB serde_saphyr <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
0.0% 0.2% 28.0KiB aws_lc_sys aws_lc_0_45_0_edwards25519_scalarmuldouble_alt
0.0% 0.2% 27.5KiB aws_lc_sys aws_lc_0_45_0_edwards25519_scalarmuldouble
0.0% 0.2% 27.0KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 27.0KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 27.0KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 27.0KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 26.9KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 24.5KiB prek <prek::workspace::Project>::init_hooks::{closure#0}
4.2% 86.9% 11.0MiB And 20339 smaller methods. Use -n N to show more.
4.8% 100.0% 12.7MiB .text section size, the file size is 264.6MiB
Base Branch ResultsFile .text Size Crate Name
0.1% 2.6% 332.0KiB aws_lc_sys aws_lc_0_45_0_aes_gcm_encrypt_avx512
0.1% 2.6% 332.0KiB aws_lc_sys aws_lc_0_45_0_aes_gcm_decrypt_avx512
0.0% 0.8% 96.5KiB prek <prek::cli::Command as clap_builder::derive::Subcommand>::augment_subcommands
0.0% 0.4% 50.1KiB prek <<prek::config::hook::HookWire as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<&mut <serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
0.0% 0.4% 48.7KiB annotate_snippets annotate_snippets::renderer::render::render
0.0% 0.3% 43.9KiB prek <<prek::config::Config as serde_core::de::Deserialize>::deserialize::__Visitor as serde_core::de::Visitor>::visit_map::<&mut <serde_saphyr::de::deserializer::YamlDeserializer as serde_core::de::Deserializer>::deserialize_map::MA>
0.0% 0.3% 41.2KiB prek prek::run::{closure#0}
0.0% 0.3% 40.3KiB prek <prek::cli::RunOptions as clap_builder::derive::Args>::augment_args
0.0% 0.3% 36.8KiB prek prek::cli::run::run::run::{closure#0}
0.0% 0.2% 28.8KiB serde_saphyr <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
0.0% 0.2% 28.6KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 28.4KiB serde_saphyr <granit_parser::scanner::Scanner<granit_parser::input::str::StrInput>>::fetch_more_tokens
0.0% 0.2% 28.0KiB aws_lc_sys aws_lc_0_45_0_edwards25519_scalarmuldouble_alt
0.0% 0.2% 27.5KiB aws_lc_sys aws_lc_0_45_0_edwards25519_scalarmuldouble
0.0% 0.2% 27.2KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 27.0KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 27.0KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 27.0KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 26.9KiB prek prek::archive::unpack::<fs_err::tokio::file::File, &std::path::PathBuf>::{closure#0}
0.0% 0.2% 24.5KiB prek <prek::workspace::Project>::init_hooks::{closure#0}
4.1% 86.6% 10.7MiB And 20201 smaller methods. Use -n N to show more.
4.7% 100.0% 12.3MiB .text section size, the file size is 263.5MiB
|
Sorry, something went wrong.
⚡️ Hyperfine BenchmarksSummary: 0 regressions, 0 improvements above the 10% threshold. Environment
Benchmarking basic commands in the main repo: prek --version
prek list
prek validate-config .pre-commit-config.yaml⏭️ Skipped: .pre-commit-config.yaml not found prek sample-config
Comparing first run (cold) vs subsequent runs (warm cache): prek run --all-files (cold - no cache)
prek run --all-files (warm - with cache)
Running the builtin hook suite on the benchmark workspace: prek run --all-files (full builtin hook suite)
Benchmarking each hook individually on the test repo: prek run trailing-whitespace --all-files
prek run end-of-file-fixer --all-files
prek run check-json --all-files
prek run check-yaml --all-files
prek run check-toml --all-files
prek run check-xml --all-files
prek run detect-private-key --all-files
prek run fix-byte-order-marker --all-files
Benchmarking hook installation (fast path hooks skip Python setup): prek install-hooks (cold - no cache)
prek install-hooks (warm - with cache)
Testing different file selection modes: prek run (staged files only)
prek run --files '*.json' (specific file type)
Benchmarking hook discovery and initialization overhead: prek run --dry-run --all-files (measures init overhead)
Benchmarking meta hooks separately: prek run check-hooks-apply --all-files
prek run check-useless-excludes --all-files
prek run identity --all-files
|
Sorry, something went wrong.
|
Ready for review ! I am doing another PR related , to check the DCO signoff status |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Why
Verifying commit signatures before a push has no good option today. Wiring git verify-commit up as a local hook runs into the problems described in #2720:
How
Adds a builtin hook, check-signed-commit, that checks every non-merge commit in the range being pushed against Git's own signature status (%G? from git log), in a single git log call (no per-commit subprocess, no filename plumbing):
Example
check for commit signatures..............................................Failed - hook id: check-signed-commit - exit code: 1 a1b2c3d [N] no signature: fix typo Commit signature status codes: G good signature ...Closes #2720
🤖 Generated with Claude Code