From 708dc442821c21e2ad527b3be479548a81d321f4 Mon Sep 17 00:00:00 2001 From: Sup Yut Sum Date: Thu, 3 Jan 2013 00:35:04 +0800 Subject: [PATCH] Check if msysgit >= 1.7.11 to use git push --recurse-submodule=on-demand Signed-off-by: Sup Yut Sum --- Languages/Tortoise.pot | 5 +++++ src/Resources/TortoiseProcENG.rc | 1 + src/TortoiseProc/PushDlg.cpp | 10 ++++++++++ src/TortoiseProc/resource.h | 1 + 4 files changed, 17 insertions(+) diff --git a/Languages/Tortoise.pot b/Languages/Tortoise.pot index 3f298a616..f72136652 100644 --- a/Languages/Tortoise.pot +++ b/Languages/Tortoise.pot @@ -235,6 +235,11 @@ msgstr "" msgid "%s in %s" msgstr "" +#. Resource IDs: (1383) +#, c-format +msgid "%s requires msysgit >= %s" +msgstr "" + #. Resource IDs: (357) #, c-format msgid "%s, at %s" diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index 032f1d8bb..2de5b5814 100644 --- a/src/Resources/TortoiseProcENG.rc +++ b/src/Resources/TortoiseProcENG.rc @@ -3906,6 +3906,7 @@ BEGIN IDS_FILEDIFF_EXT "Extension" IDS_ERR_EMPTYDIFF "No differences found!" IDS_PROC_TAG_FF "Tag (FF)" + IDS_GITVER_REQUIRED "%s requires msysgit >= %s" END #endif // English (U.S.) resources diff --git a/src/TortoiseProc/PushDlg.cpp b/src/TortoiseProc/PushDlg.cpp index df4ebc1c2..a7afcc759 100644 --- a/src/TortoiseProc/PushDlg.cpp +++ b/src/TortoiseProc/PushDlg.cpp @@ -441,6 +441,16 @@ void CPushDlg::OnBnClickedOk() this->m_regAutoLoad = m_bAutoLoad ; m_RecurseSubmodules = m_RecurseSubmodulesCombo.GetCurSel(); + if (m_RecurseSubmodules == 2) + { + if (CAppUtils::GetMsysgitVersion() < 0x01070b00) + { + CString gitver; + gitver.Format(CString(MAKEINTRESOURCE(IDS_GITVER_REQUIRED)), _T("--recurse-submodules=on-demand"), _T("1.7.11")); + CMessageBox::Show(m_hWnd, gitver, _T("TortoiseGit"), MB_OK | MB_ICONERROR); + return; + } + } CHorizontalResizableStandAloneDialog::OnOK(); } diff --git a/src/TortoiseProc/resource.h b/src/TortoiseProc/resource.h index d11972319..9464e266b 100644 --- a/src/TortoiseProc/resource.h +++ b/src/TortoiseProc/resource.h @@ -842,6 +842,7 @@ #define IDC_BUTTON_REMOTE_BRANCH 1383 #define IDC_EDITLOCALGITCONFIG 1383 #define IDC_COMMIT 1383 +#define IDS_GITVER_REQUIRED 1383 #define IDC_BUTTON_BAD 1383 #define IDC_BUTTON_DIR 1384 #define IDC_BUTTON_DOWN 1384 -- 2.11.4.GIT