You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered:
mwgabby-li
changed the title
Improvements to Diffing Against Staged Files
Improvements to External Diffing Against Staged Files
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:
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.
The text was updated successfully, but these errors were encountered: