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 staged file renamed with changes showing no diff #17467

Merged
merged 5 commits into from
Dec 5, 2024

Conversation

ssigwart
Copy link
Contributor

Description

Fixes the case where a staged file is moved and modified. Previously, it would say it was moved with no changes.

Screenshots

image

@steveward steveward added the external Pull request originating outside of the Desktop core team label Oct 4, 2024
Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

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

@ssigwart Thanks for this contribution. I apologize for the long delay in review (small team, pr's are as we can get to them). I understand if you do not want to pick this back up after so much time. But if you do, here is some feedback:

I believe it is fairly non-invasive approach to having better messaging and appears to work as expected. I have left some code-base stylistic comments. Also, I can tell that if the CI had triggered, the linter would have failed. Thus, to get this PR another review, we will need to bring it up to date with development, address the pr suggestions, and run yarn:lint:fix. At that point, I will do more testing.

As said above, totally understand if you do not want to pick this back up. If that is the case we will close it in a couple of weeks.

- Closes desktop#6014
- Fixes the case where a staged file is moved and modified. Previously, it would say it was moved with no changes.
@ssigwart
Copy link
Contributor Author

ssigwart commented Nov 27, 2024

Thanks, @tidy-dev. I rebased and applied the updates you suggested. The GitHub actions don't run without approval for me, but I ran yarn lint and yarn lint:fix locally.

@tidy-dev
Copy link
Contributor

@ssigwart We have some failing unit test since the status module has changed. Can you address those?

To run unit tests, use yarn test:unit.
To only run unit tests for only one of those files, you can run something like yarn test:unit log to do the log-test file and yarn test:unit status for the status-test file.

Showing four failed unit tests

@ssigwart
Copy link
Contributor Author

@tidy-dev, I fixed them. Thanks for the pointers on how to run the tests that failed.

@ssigwart
Copy link
Contributor Author

ssigwart commented Dec 5, 2024

@tidy-dev, I noticed that the unit tests ran today and there were some lint errors, so I ran yarn lint:fix and pushed a new commit.

Copy link
Contributor

@tidy-dev tidy-dev left a comment

Choose a reason for hiding this comment

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

Works as expected. Thank you!

@tidy-dev tidy-dev merged commit 9d14ae6 into desktop:development Dec 5, 2024
7 checks passed
@ssigwart ssigwart deleted the renameChanged2 branch December 7, 2024 02:57
@ssigwart
Copy link
Contributor Author

ssigwart commented Dec 7, 2024

Thanks for reviewing and merging, @tidy-dev!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external Pull request originating outside of the Desktop core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Changes from renamed files are ignored
3 participants