Skip to content

Unified diff: File deletions can't be partially selected #7895

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

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

estib-vega
Copy link
Contributor

@estib-vega estib-vega commented Mar 31, 2025

Don’t let the user partially select the hunk if they are file deletions

TODO: don't allow partial selections on diff-filtered hunks
See #7893

Don’t let the user partially select the hunk if they are file deletions
Copy link

vercel bot commented Mar 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 31, 2025 9:17am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
gitbutler-web ⬜️ Skipped (Inspect) Mar 31, 2025 9:17am

@vercel vercel bot temporarily deployed to Preview – gitbutler-web March 31, 2025 09:16 Inactive
@estib-vega estib-vega merged commit cac0234 into master Mar 31, 2025
19 checks passed
@estib-vega estib-vega deleted the e-branch-1 branch March 31, 2025 09:29
@Byron
Copy link
Collaborator

Byron commented Mar 31, 2025

This is something that could also be relaxed if there was value in it.

When committing for instance, there is no such restriction yet, and I guess we will just try it to see how it feels before conforming the behaviour across operations.

@estib-vega
Copy link
Contributor Author

@Byron, interesting. How would that work, though?
Would the file just become a modification if you were to discard/commit some lines?

@Byron
Copy link
Collaborator

Byron commented Mar 31, 2025

Exactly that. It's kind of… strange, but maybe useful?

@estib-vega
Copy link
Contributor Author

Exactly that. It's kind of… strange, but maybe useful?

If that's the case, I'll undo it. That sounds cool

@Byron
Copy link
Collaborator

Byron commented Apr 1, 2025

Just to be clear: For discarding it won't work as the backend doesn't currently allow it, but the commit-engine doesn't have this limitation built-in. There is where that capability could be tried.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants