Cannot "format-patch" from from stash
What steps will reproduce the problem?
- Make changes and stash the changes
- Got to stash listing
- Right click on stashed item and select format patch
- Tried all 3 version selection options but could not get a patch based on the stashed listing. It was always returning a patch from items I had committed.
What is the expected output? What do you see instead? I would like to be able to generate a patch from a stashed item. If this is not supported then I would expect the format patch option not to exist in the menu.
What version of TortoiseGit and Git are you using? On what operating system? TortoiseGit 2.11.0.0 (c:\Program Files\TortoiseGit\bin) git version 2.25.1.windows.1 (C:\Program Files\Git\bin; C:\Program Files\Git\mingw64; C:\Program Files\Git\etc\gitconfig)
Please provide any additional information below. I noticed that my output from generating the patch was similar to the following.
git.exe f- ormat-patch -o "C:/Projects/test" bd11d7d02c7950d95d0739932ec034799fe6d3c3
git.exe format-patch -o "C:/Projects/test" -1 C:/Projects/test/0001-Fix.patch
git.exe format-patch -o "C:/Projects/test" bd11d7d02c7950d95d0739932ec034799fe6d3c3~1..bd11d7d02c7950d95d0739932ec034799fe6d3c3 C:/Projects/test/0001-Fix.patch
According to the following https://stackoverflow.com/questions/2160638/how-can-i-format-patch-with-what-i-stash-away It seems the command should have been similar to the following.
git stash show -p stash@{1} > C:/Projects/test/0001-Fix.patch