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

Fixes a bug where minor XML changes are not suppressed properly #957

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

olsen232
Copy link
Collaborator

Statistics-only changes to PAM files are considered minor and do not show up in diffs - this is because various tools generate them as a side effect without the user actually trying to modify the working copy.

However, working-copy.is_dirty() checks are performed more efficiently than status or diff commands - they just search for a single dirty path and then do an early exit. The find-any-dirty-path logic did not (until now) properly suppress minor XML changes.

This resulted in a bug whereby kart status and kart diff showed no changes, but attempting to switch branch would not work due to a the is_dirty() check returning True.

Checklist:

  • Have you reviewed your own change?
  • Have you included test(s)?
  • Have you updated the changelog?

Statistics-only changes to PAM files are considered minor and do not show up
in diffs - this is because various tools generate them as a side effect
without the user actually trying to modify the working copy.

However, working-copy.is_dirty() checks are performed more efficiently
than status or diff commands - they just search for a single dirty
path and then do an early exit. The find-any-dirty-path logic did not
(until now) properly suppress minor XML changes.

This resulted in a bug whereby `kart status` and `kart diff` showed
no changes, but attempting to switch branch would not work due to
a the is_dirty() check returning True.
@olsen232 olsen232 merged commit 5f7a6dd into master Dec 11, 2023
33 checks passed
@olsen232 olsen232 deleted the suppress-minor-changes-fix branch December 11, 2023 06:11
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.

2 participants