[PR #578] Optimize hooks-mode cherry-pick finalization performance #584

Open
opened 2026-03-02 04:14:02 +03:00 by kerem · 0 comments
Owner

Original Pull Request: https://github.com/git-ai-project/git-ai/pull/578

State: open
Merged: No


Summary

  • align cherry-pick hooks-mode rewrite finalization with rebase-style terminal-only finalization
  • tighten cherry-pick terminal-step detection so heavy rewrite runs once at sequence end
  • skip managed repo lookup for prepare-commit-msg to remove per-commit overhead in hooks mode
  • add regression assertion that multi-commit cherry-pick emits exactly one cherry_pick_complete event with full mappings

Validation

  • cargo fmt -- --check
  • cargo clippy
  • cargo test -- --test-threads=8
  • cargo test --test hook_modes -- --test-threads=8
  • python3 scripts/benchmarks/git/benchmark_modes_vs_main.py --iterations-basic 5 --iterations-complex 4 --margin-pct 25.0 --margin-baseline current_wrapper --enforce-margin --work-root /tmp/git-ai-bench-after-full-1771956806
  • python3 scripts/benchmarks/git/benchmark_nasty_modes_vs_main.py --work-root /tmp/git-ai-nasty-pr-smoke-1771960740 --feature-commits 24 --main-commits 10 --side-commits 8 --files 4 --lines-per-file 400 --burst-every 6 --repetitions 1 --margin-pct 25 --margin-baseline current_wrapper --enforce-margin

Open with Devin
**Original Pull Request:** https://github.com/git-ai-project/git-ai/pull/578 **State:** open **Merged:** No --- ## Summary - align cherry-pick hooks-mode rewrite finalization with rebase-style terminal-only finalization - tighten cherry-pick terminal-step detection so heavy rewrite runs once at sequence end - skip managed repo lookup for prepare-commit-msg to remove per-commit overhead in hooks mode - add regression assertion that multi-commit cherry-pick emits exactly one cherry_pick_complete event with full mappings ## Validation - cargo fmt -- --check - cargo clippy - cargo test -- --test-threads=8 - cargo test --test hook_modes -- --test-threads=8 - python3 scripts/benchmarks/git/benchmark_modes_vs_main.py --iterations-basic 5 --iterations-complex 4 --margin-pct 25.0 --margin-baseline current_wrapper --enforce-margin --work-root /tmp/git-ai-bench-after-full-1771956806 - python3 scripts/benchmarks/git/benchmark_nasty_modes_vs_main.py --work-root /tmp/git-ai-nasty-pr-smoke-1771960740 --feature-commits 24 --main-commits 10 --side-commits 8 --files 4 --lines-per-file 400 --burst-every 6 --repetitions 1 --margin-pct 25 --margin-baseline current_wrapper --enforce-margin <!-- devin-review-badge-begin --> --- <a href="https://app.devin.ai/review/git-ai-project/git-ai/pull/578" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://static.devin.ai/assets/gh-open-in-devin-review-dark.svg?v=1"> <img src="https://static.devin.ai/assets/gh-open-in-devin-review-light.svg?v=1" alt="Open with Devin"> </picture> </a> <!-- devin-review-badge-end -->
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/git-ai#584
No description provided.