-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Changes from renamed files are ignored #6014
Comments
Can reproduce this issue on 1.7.0-beta6, mac. Not sure if this error was related but it popped up at the same time:
This is a UI issue, as the changes to the file are surfaced in the History tab and not lost. |
This Issue Occurs On All Platforms. |
This is an absolute must have feature. Lack thereof makes GitHub Desktop unusable. I just missed some changes because the file was also renamed at the same time and GitHub Desktop just says |
desktop/app/src/ui/diff/index.tsx Lines 210 to 216 in 0fec3ad
This lines seemingly think that renamed files are always unchanged. Edit: Ah no, |
Another instance of this issue in #12501 |
- Closes desktop#6014 - If a file is renamed with changes and is staged, both the rename and differences will be shown with this update. - If a file is renamed is staged, but not all changes, a warning message is shown that the file must be staged. Otherwise, I would have to choose between showing the diff for the staged or unstaged changes, but not both.
I just submitted #17364 which solves this. However, if there are both staged and unstaged changes to a renamed file, I couldn't figure out how to show both of them, but I added a message saying that you need to stage all the changes before you can see the diff. That seems much better than the current state that says that there were no changes. |
@sergiou87, I see that desktop/app/src/lib/status-parser.ts Lines 322 to 329 in a1ece18
If I could find a way to pass through that field to the diff renderer, I could have it change the message to " The file was renamed and modified." desktop/app/src/ui/diff/index.tsx Lines 210 to 216 in 0fec3ad
Is that a good approach? |
I think so, as long as this change is introduced in a safe way that doesn't affect the rest of well-supported scenarios. It definitely feels more reliable than the previous one 😄 |
- Closes desktop#6014 - Fixes the case where a staged file is moved and modified. Previously, it would say it was moved with no changes.
Thanks, @sergiou87. I opened #17467. It's still a bit of passing around fields, but doesn't mess with the actual |
Description
Files can simultaneously be renamed and changed, but GitHub Desktop ignores content changes from renamed files.
Version
Steps to Reproduce
git add
the file and see what GitHub Desktop says.Expected Behavior
GitHub Desktop should show content changes, as VSCode does:
Actual Behavior
It ignores any content change.
Additional Information
Logs
The text was updated successfully, but these errors were encountered: