-
Notifications
You must be signed in to change notification settings - Fork 391
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
Allow deleting files in diffedit and split #5486
base: main
Are you sure you want to change the base?
Conversation
e22b6f0
to
7ac982e
Compare
7ac982e
to
029d1b2
Compare
347f2d4
to
3537330
Compare
The commit style still applies, so the relevant (last) commit probably should use something like |
3537330
to
6f0676a
Compare
@PhilipMetzger Thanks, I wasn't sure what to use as the topic. Prior commits in the history seem to use |
SGTM, no need for a further change as my suggestion probably was misleading. |
6f0676a
to
0e8590e
Compare
…iles The code in this area gets significantly simpler, since there's no longer any ambiguity to resolve. The scm-record changes expect that any mode changes are represented by file mode sections, and adds UI hooks to simplify working with them (e.g. automatically de-selecting a deletion mode change if any lines in the file are de-selected, since the file still needs to exist to hold those lines). As a result, mode changes always come back from scm-record as a FileModeTransition and we can handle them explicitly. 'No changes selected' always comes back as None, so if we get None we can always skip the file entirely and use the previous content/mode.
0e8590e
to
1fd24af
Compare
@arxanas, did you say that you're going to review this? |
Extends #4078 but with a slightly different approach based on a discussion in Discord: https://discord.com/channels/968932220549103686/1325114717387100201
It relies on changes in arxanas/scm-record#93 to function.
The code in this area gets significantly simpler, since there's no longer any ambiguity to resolve. The
scm-record
changes expect that any mode changes are represented by file mode sections, and adds UI hooks to simplify working with them (e.g. automatically de-selecting a deletion mode change if any lines in the file are de-selected, since the file still needs to exist to hold those lines).As a result, mode changes always come back from
scm-record
as aFileModeTransition
and we can handle them explicitly. 'No changes selected' always comes back asNone
, so if we getNone
we can always skip the file entirely and use the previous content/mode.This also uses code from #4078 to ensure executable bits are respected.
Fixes #3702
Fixes #3846.
Checklist
If applicable:
CHANGELOG.md
(I will once it's confirmed that everyone is happy with the approach)I have updated the documentation (README.md, docs/, demos/)I have updated the config schema (cli/src/config-schema.json)