Patches created from "Create patch file" in diff view/TortoiseGitMerge has invalid filepath
By magnesan... on July 21, 2015 18:02 (imported from Google Code)
What steps will reproduce the problem?
- Make som change to a file, don't commit
- Rightclick file: TortoiseGit -> Diff
- Click "Create patch file"
- Rightclick file: TortoiseGit -> Revert
- Save the file in the same folder as the diff'ed file
- Rightclick patch file: TortoiseGit -> Review/apply single patch...
What is the expected output? What do you see instead?
I'd expect the patch to reapply the reverted changes. Instead I get an error "file not found" and applying the patch does nothing.
What version of TortoiseGit and msysgit are you using? On
what operating system?
TortoiseGit 1.8.14.0
Git: 1.9.5.msysgit.0
Windows 7 all updates
Please provide any additional information below.
It seems TortoiseGit isn't aware of which context it's being used, and only looks at the two files as any two files. The problem is that the "source" file in that case is a temporary file created by the diff process which doesn't exist later, and a/ and b/ should probably be what b/ is today. I also see when comparing with a working patch file created by Eclipse that TortoiseGitMerge uses \ instead of / in the path and that TortoiseGitMerge uses absolute paths instead of repository relative as Eclipse does.