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?
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.
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 ....."
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?
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?