OSDN Git Service

Commit Dialog can Revert files which "revert to version" in log dialog
authorFrank Li <lznuaa@gmail.com>
Sun, 8 Mar 2009 04:32:55 +0000 (12:32 +0800)
committerFrank Li <lznuaa@gmail.com>
Mon, 9 Mar 2009 13:23:41 +0000 (21:23 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Git/Git.cpp
src/Git/GitStatusListCtrl.cpp

index 2d00110..2733a88 100644 (file)
@@ -1023,13 +1023,13 @@ int CGit::Revert(CTGitPath &path,bool keep)
                if(g_Git.Run(cmd,&out,CP_OEMCP))\r
                        return -1;\r
                \r
-               cmd.Format(_T("git.exe checkout -f -- \"%s\""),path.GetGitOldPathString());\r
+               cmd.Format(_T("git.exe checkout HEAD -f -- \"%s\""),path.GetGitOldPathString());\r
                if(g_Git.Run(cmd,&out,CP_OEMCP))\r
                        return -1;\r
        }\r
        else\r
        {\r
-               cmd.Format(_T("git.exe checkout -f -- \"%s\""),path.GetGitPathString());\r
+               cmd.Format(_T("git.exe checkout HEAD -f -- \"%s\""),path.GetGitPathString());\r
                if(g_Git.Run(cmd,&out,CP_OEMCP))\r
                        return -1;\r
        }\r
index fa4302a..5d40a33 100644 (file)
@@ -3153,7 +3153,7 @@ void CGitStatusListCtrl::OnContextMenuList(CWnd * pWnd, CPoint point)
                                        CString str;\r
                                        str.Format(IDS_PROC_WARNREVERT,GetSelectedCount());\r
 \r
-                                       if (!bConfirm || CMessageBox::Show(this->m_hWnd, str, _T("TortoiseSVN"), MB_YESNO | MB_ICONQUESTION)==IDYES)\r
+                                       if (!bConfirm || CMessageBox::Show(this->m_hWnd, str, _T("TortoiseGit"), MB_YESNO | MB_ICONQUESTION)==IDYES)\r
                                        {\r
                                                CTGitPathList targetList;\r
                                                FillListOfSelectedItemPaths(targetList);\r