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 382
    • Issues 382
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 16
    • Merge requests 16
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • 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
  • #3261
Closed
Open
Issue created Aug 30, 2018 by Leto@Leto58

Review/Apply single patch does not work anymore if patch does not apply cleanly

Hi

What steps will reproduce the problem?

  1. create 2 working copies for 2 branches of a same collection (B1 and B2). B1 and B2 should be similar enough in order that a patch from B1 on B2 is relevant.
  2. in log view for B1, select whatever unique file in whatever commit, having the "view patch" function enabled
  3. select the content of the patch view and save it as "1.patch" under the main directory of the working copy of B2
  4. right click on 1.patch and select "Review/Apply single patch"

What is the expected output? What do you see instead?
The TortoiseGitMerge should open and show the file to be patched in the summary window.
Instead it consequently shows a message box:

 Could not parse revision.
 libgit2 returned: revspec 'xxxxxxx' not found

where 'xxxxxxx' is an hexa value.

What version of TortoiseGit and Git are you using? On what operating system?
TG 2.7.0.0
Git 2.18.0.windows.1

Please provide any additional information below.
By comparing the value in the box with the content of the patch I can see that it is the last 7 chars of the first number given on the 'index' line (the 2nd line, just under the first one 'diff....'). But this number contains 9 chars in my file. It is as if TortoiseGit expected indexes made of only 7 chars.
Sure enough, if I get older patches, they all have 'index 1234567..1234567 100644', but never 'index 123456789..123456789 100644'. TortoiseGit handle them without any problems.
If I now take the patch I just generated, and remove the last 2 digits of each index value, it works too.

Maybe there was a format change in Git about indexes that TortoiseGit was not aware of.

Regards
Leto

Edited Sep 01, 2018 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