From: Sven Strickroth Date: Sun, 24 Mar 2013 19:23:03 +0000 (+0100) Subject: Provide more information to user when there is a problem with git.exe X-Git-Tag: REL_1.8.2.0_EXTERNAL~16 X-Git-Url: https://repo.or.cz/w/TortoiseGit.git/commitdiff_plain/690ce9e4c11a485ca5b74b36978a58e685445864 Provide more information to user when there is a problem with git.exe Signed-off-by: Sven Strickroth --- diff --git a/src/TortoiseProc/AppUtils.cpp b/src/TortoiseProc/AppUtils.cpp index a37ea7de3..fb451b615 100644 --- a/src/TortoiseProc/AppUtils.cpp +++ b/src/TortoiseProc/AppUtils.cpp @@ -2968,7 +2968,7 @@ int CAppUtils::GetMsysgitVersion(CString *versionstr) cmd = _T("git.exe --version"); if (g_Git.Run(cmd, &version, &err, CP_UTF8)) { - CMessageBox::Show(NULL, _T("git have not installed (") + err + _T(")"), _T("TortoiseGit"), MB_OK|MB_ICONERROR); + CMessageBox::Show(NULL, _T("git.exe not correctly set up (") + err + _T(")\nCheck TortoiseGit settings and consult help file for \"Git.exe Path\"."), _T("TortoiseGit"), MB_OK|MB_ICONERROR); return false; } } diff --git a/src/TortoiseProc/Settings/SetMainPage.cpp b/src/TortoiseProc/Settings/SetMainPage.cpp index 7da3f68f7..663279afb 100644 --- a/src/TortoiseProc/Settings/SetMainPage.cpp +++ b/src/TortoiseProc/Settings/SetMainPage.cpp @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2008-2012 - TortoiseGit +// Copyright (C) 2008-2013 - TortoiseGit // Copyright (C) 2003-2008 - TortoiseSVN // This program is free software; you can redistribute it and/or @@ -221,7 +221,8 @@ BOOL CSetMainPage::OnApply() } else { - CMessageBox::Show(NULL,_T("Msys Git Install Path Error"),_T("TortoiseGit"),MB_OK|MB_ICONERROR); + if (CMessageBox::Show(NULL, _T("Invalid git.exe path.\nCheck help file for \"Git.exe Path\"."), _T("TortoiseGit"), 1, IDI_ERROR, CString(MAKEINTRESOURCE(IDS_MSGBOX_OK)), CString(MAKEINTRESOURCE(IDS_MSGBOX_HELP))) == 2) + OnHelp(); return 0; } } @@ -286,10 +287,14 @@ void CSetMainPage::OnCheck() cmd=_T("git.exe --version"); g_Git.Run(cmd,&out,CP_UTF8); this->GetDlgItem(IDC_MSYSGIT_VER)->SetWindowText(out); + if (out.IsEmpty()) + if (CMessageBox::Show(NULL, _T("Could not get read version information from git.exe.\nCheck help file for \"Git.exe Path\"."),_T("TortoiseGit"), 1, IDI_ERROR, CString(MAKEINTRESOURCE(IDS_MSGBOX_OK)), CString(MAKEINTRESOURCE(IDS_MSGBOX_HELP))) == 2) + OnHelp(); } else { - CMessageBox::Show(NULL,_T("Msys Git Install Path Error"),_T("TortoiseGit"),MB_OK|MB_ICONERROR); + if (CMessageBox::Show(NULL, _T("Invalid git.exe path.\nCheck help file for \"Git.exe Path\"."), _T("TortoiseGit"), 1, IDI_ERROR, CString(MAKEINTRESOURCE(IDS_MSGBOX_OK)), CString(MAKEINTRESOURCE(IDS_MSGBOX_HELP))) == 2) + OnHelp(); } Store (oldpath, m_regMsysGitPath);