Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • TortoiseGit TortoiseGit
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 380
    • Issues 380
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • TortoiseGitTortoiseGit
  • TortoiseGitTortoiseGit
  • Issues
  • #3658
Closed
Open
Issue created Nov 06, 2020 by Ian@ianwallen

Cannot "format-patch" from from stash

What steps will reproduce the problem?

  1. Make changes and stash the changes
  2. Got to stash listing
  3. Right click on stashed item and select format patch
  4. 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

Edited Dec 30, 2021 by Sven Strickroth
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking