OSDN Git Service

Del RefLog work.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / AppUtils.cpp
index 86f0339..fe90817 100644 (file)
@@ -42,6 +42,7 @@
 #include "GitSwitchDlg.h"\r
 #include "ResetDlg.h"\r
 #include "DeleteConflictDlg.h"\r
+#include "ChangedDlg.h"\r
 \r
 CAppUtils::CAppUtils(void)\r
 {\r
@@ -51,6 +52,29 @@ CAppUtils::~CAppUtils(void)
 {\r
 }\r
 \r
+int     CAppUtils::StashApply(CString ref)\r
+{\r
+       CString cmd,out;\r
+       cmd=_T("git.exe stash apply ");\r
+       cmd+=ref;\r
+       \r
+       if(g_Git.Run(cmd,&out,CP_ACP))\r
+       {\r
+               CMessageBox::Show(NULL,CString(_T("<ct=0x0000FF>Stash Apply Fail!!!</ct>\n"))+out,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
+\r
+       }else\r
+       {\r
+               if(CMessageBox::Show(NULL,CString(_T("<ct=0xff0000>Stash Apply Success</ct>\nDo you want to show change?"))\r
+                       ,_T("TortoiseGit"),MB_YESNO|MB_ICONINFORMATION) == IDYES)\r
+               {\r
+                       CChangedDlg dlg;\r
+                       dlg.m_pathList.AddPath(CTGitPath());\r
+                       dlg.DoModal();                  \r
+               }\r
+               return 0;\r
+       }\r
+       return -1;\r
+}\r
 bool CAppUtils::GetMimeType(const CTGitPath& file, CString& mimetype)\r
 {\r
 #if 0\r