From 78cb7aa2d058955fbf8aedf68c3e44777602c4f3 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Sun, 9 Oct 2011 20:20:38 +0200 Subject: [PATCH] provide error mesasges the to user Signed-off-by: Sven Strickroth --- src/Git/Git.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Git/Git.cpp b/src/Git/Git.cpp index 5378858d9..08ae68b31 100644 --- a/src/Git/Git.cpp +++ b/src/Git/Git.cpp @@ -1510,11 +1510,17 @@ int CGit::Revert(CString commit, CTGitPath &path) { cmd.Format(_T("git.exe mv -- \"%s\" \"%s\""),path.GetGitPathString(),path.GetGitOldPathString()); if(g_Git.Run(cmd,&out,CP_ACP)) + { + ::MessageBox(NULL, out, _T("TortoiseGit"), MB_OK|MB_ICONERROR); return -1; + } cmd.Format(_T("git.exe checkout %s -f -- \"%s\""), commit, path.GetGitOldPathString()); if(g_Git.Run(cmd,&out,CP_ACP)) + { + ::MessageBox(NULL, out, _T("TortoiseGit"), MB_OK|MB_ICONERROR); return -1; + } } else if(path.m_Action & CTGitPath::LOGACTIONS_ADDED) @@ -1522,13 +1528,19 @@ int CGit::Revert(CString commit, CTGitPath &path) cmd.Format(_T("git.exe rm -f --cached -- \"%s\""),path.GetGitPathString()); if(g_Git.Run(cmd,&out,CP_ACP)) + { + ::MessageBox(NULL, out, _T("TortoiseGit"), MB_OK|MB_ICONERROR); return -1; + } } else { cmd.Format(_T("git.exe checkout %s -f -- \"%s\""), commit, path.GetGitPathString()); if(g_Git.Run(cmd,&out,CP_ACP)) + { + ::MessageBox(NULL, out, _T("TortoiseGit"), MB_OK|MB_ICONERROR); return -1; + } } return 0; } -- 2.11.4.GIT