Skip to content

Add a regression test for git commit -a index corruption#1819

Merged
j178 merged 1 commit intomasterfrom
test/document-git-index-failure
Mar 18, 2026
Merged

Add a regression test for git commit -a index corruption#1819
j178 merged 1 commit intomasterfrom
test/document-git-index-failure

Conversation

@j178
Copy link
Owner

@j178 j178 commented Mar 18, 2026

closes #1815
closes #1786

Copilot AI review requested due to automatic review settings March 18, 2026 04:03
@j178 j178 added the ci CI related label Mar 18, 2026
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.72%. Comparing base (7116100) to head (a6dbdb1).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1819   +/-   ##
=======================================
  Coverage   91.72%   91.72%           
=======================================
  Files          98       98           
  Lines       20055    20055           
=======================================
+ Hits        18395    18396    +1     
+ Misses       1660     1659    -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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates prek’s integration test suite around git commit -a hook execution to better normalize snapshot output and to document/reproduce a currently-known failure mode involving GIT_INDEX_FILE.

Changes:

  • Extend the git_commit_a snapshot filters to normalize an additional hash value.
  • Add a new Unix-only regression/repro test that captures the current failure when a hook writes to a temp git index during git commit -a.

@j178 j178 merged commit 243e939 into master Mar 18, 2026
53 of 54 checks passed
@j178 j178 deleted the test/document-git-index-failure branch March 18, 2026 04:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci CI related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fatal: unable to read <hash> during post-hook git diff check

2 participants