Skip to content

Conversation

@6d7a
Copy link
Contributor

@6d7a 6d7a commented Nov 13, 2025

Context

When calling ggshield secret scan pre-commit during an ongoing merge with unmerged files, ggshield throws an error. This PR fixes this.

Closes #1002

What has been done

Unmerged files that are scanned by the pre-commit hook during an ongoing merge will be marked as unmerged and scanned if they contain diffs.

Validation

See #1002 for a reproducible example.

PR check list

  • As much as possible, the changes include tests (unit and/or functional)
  • If the changes affect the end user (new feature, behavior change, bug fix) then the PR has a changelog entry (see doc/dev/getting-started.md). If the changes do not affect the end user, then the skip-changelog label has been added to the PR.

@6d7a 6d7a requested a review from a team as a code owner November 13, 2025 10:59
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.97%. Comparing base (a4076b9) to head (41d0958).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1148   +/-   ##
=======================================
  Coverage   91.96%   91.97%           
=======================================
  Files         144      144           
  Lines        6199     6202    +3     
=======================================
+ Hits         5701     5704    +3     
  Misses        498      498           
Flag Coverage Δ
unittests 91.97% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@6d7a 6d7a force-pushed the kevinwestphal/handle-unmerged-files branch from b98bbff to 2c2c0a8 Compare November 13, 2025 11:09
Unmerged files that are scanned by the pre-commit hook during an ongoing merge will be marked as unmerged and scanned if they contain diffs.
@6d7a 6d7a force-pushed the kevinwestphal/handle-unmerged-files branch from 2c2c0a8 to 41d0958 Compare November 13, 2025 13:02
Copy link
Collaborator

@agateau-gg agateau-gg left a comment

Choose a reason for hiding this comment

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

Nice!

@6d7a 6d7a merged commit d7f1ebe into main Nov 14, 2025
30 checks passed
@6d7a 6d7a deleted the kevinwestphal/handle-unmerged-files branch November 14, 2025 08:57
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.

ggshield crashes when scanning unmerged files during interactive merge

3 participants