Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correctly record missing stages in index for merge conflicts #1907

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

pawamoy
Copy link
Contributor

@pawamoy pawamoy commented Dec 26, 2024

Fixes #1833.

I didn't add a test, because it would just be asserting that the Git commands do what they are supposed to, but feel free to ask for a test anyway.

I'm also not sure about the logic when a file did not exist in the previous template version, or was deleted in the latest template version: here I just skip the corresponding stage (2 when created, 3 when deleted) in the index, but maybe the whole index update (all 3 stages) could be skipped for such cases, not sure.

I rewrote the explanation comment above, reusing the wording in the SO answer, as I think it's much more readable than the previous comment.

Copy link

codecov bot commented Dec 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.77%. Comparing base (5662092) to head (f442564).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1907   +/-   ##
=======================================
  Coverage   97.77%   97.77%           
=======================================
  Files          49       49           
  Lines        5261     5269    +8     
=======================================
+ Hits         5144     5152    +8     
  Misses        117      117           
Flag Coverage Δ
unittests 97.77% <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.

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.

Merge conflicts on update disappear in git mergetool or some IDEs
1 participant