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
  • #1395
Closed
Open
Issue created Aug 02, 2015 by Sven Strickroth@mrtuxOwner

Problem restoring from earlier commit for file in a subdirectory

By jfd1... on September 13, 2012 17:00 (imported from Google Code)


> What steps will reproduce the problem?

  1. Expand the attached zip file into a directory named c:\newdir. then use Tortoise Git to do a hard reset of branch "master" to commit # 8b9a5e4f1 ("commit 4"). This creates a small working directory with files Text1.txt, subdir\all_lower.txt and subdir\Text_Sub1.txt.

  2. Open Tortoise Git log window and select earliest commit, "commit 1." In the file list in the lowest part of the window, right-click and select "Save revision to..." for each of the two listed files. It succeeds for the file in the top-level but fails for the file in subdir. The error message is "Failed to checkout file ....."

  3. Repeat step 2 for commits 2, 3 and 4. It consistently fails to restore the selected revision for either file in the subdirectory.

> What is the expected output?
Tortoise Git should restore the selected file to its state from the selected commit using the pre-supplied file name or any other file name as changed by the user.

> What do you see instead?
It fails to restore from an earlier commit, using the pre-supplied file name or any other path and name, if the selected file is not in the top-level of the repository.

> What version of TortoiseGit and msysgit are you using? On
what operating system?
TG 1.7.12.0
Msysgit 1.7.11
Win32 XP SP3

> Please provide any additional information below.

I noticed that the error message uses a Linux path separator in the first part of the message ("Failed to checkout file "subdir/Text_Sub1.txt") but a Windows path separator in the second part (... "to "C:\newdir\subdir\Text_Sub1-8a2a801.txt").

Is there any way to get more information as to why the checkout request fails?


testgit.zip

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking