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

Improvements to External Diffing Against Staged Files #2293

Open
mwgabby-li opened this issue Aug 12, 2024 · 0 comments
Open

Improvements to External Diffing Against Staged Files #2293

mwgabby-li opened this issue Aug 12, 2024 · 0 comments

Comments

@mwgabby-li
Copy link

mwgabby-li commented Aug 12, 2024

If you do an external diff of a staged file that is not modified in your working copy, it seems that Fork could be diffing against the working copy instead.
That way, you could "modify" the staged file in the diff tool and those changes would show up in your working copy.

Right now, I'll sometimes do a diff and modify it, but the changes will be lost because it's modifying the temporary file.

Other thoughts about approaching this:

Prevent Modification

Prevent the files from being modified in the diff tool. Then, at least, there would be no confusion.
For example, Beyond Compare has these options:

/ro, /readonly
Prevents editing on all sides.
/ro1, /lro, /leftreadonly
/ro2, /rro, /rightreadonly
Prevents editing on the respective side.

From Beyond Compare Command-Line Reference.

Prompt to Copy Changes

Detect if modifications are made to the temporary file representing the staged file and prompt whether to copy them into the working copy.
This has disadvantages of being more complicated if the working copy is modified and retaining the possibility of losing work done in the diff tool if it is.

Lock, but Only if Workspace Changed

Prevent the staged file from being modified in the diff tool UNLESS the working copy is unmodified.
Either prompt to copy or do a diff against the working copy if it's unmodified.

@mwgabby-li mwgabby-li changed the title Improvements to Diffing Against Staged Files Improvements to External Diffing Against Staged Files Aug 12, 2024
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

No branches or pull requests

1 participant