From 18249714dcb116d5b44439641746a7143a077aaf Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 12 Oct 2012 23:56:23 +0200 Subject: [PATCH] Fixed issue #1450: Option to fetch when adding a remote Signed-off-by: Sven Strickroth --- Languages/Tortoise.pot | 4 ++++ src/Changelog.txt | 1 + src/Resources/TortoiseProcENG.rc | 2 ++ src/TortoiseProc/Settings/SettingGitRemote.cpp | 3 +++ src/TortoiseProc/resource.h | 1 + 5 files changed, 11 insertions(+) diff --git a/Languages/Tortoise.pot b/Languages/Tortoise.pot index 11fe3f2e3..3af6586fe 100644 --- a/Languages/Tortoise.pot +++ b/Languages/Tortoise.pot @@ -3225,6 +3225,10 @@ msgstr "" msgid "Do you really want to revert all changes in\n%s\nwhich were made in this revision? These changes will be reverted by reverse-merging the revision into your working tree." msgstr "" +#. Resource IDs: (86) +msgid "Do you want to fetch remote branches from the newly added remote?" +msgstr "" + #. Resource IDs: (313) msgid "Do you want to reload the documents to reflect the settings changes?\nNote: you will lose all changes you've made!" msgstr "" diff --git a/src/Changelog.txt b/src/Changelog.txt index db5685a9c..c43cf9a20 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -6,6 +6,7 @@ Released: unreleased * Fixed issue #1425: Indicate dirty state in Submodule Diff Dialog * Fixed issue #1430: Diff: allow multiple files unified diff * Fixed issue #1436: Clone Dialog add --branch and --no-checkout options + * Fixed issue #1450: Option to fetch when adding a remote == Bug Fix == * Fixed issue #1426: Pull Dialog: Unknown option 'no-ff' when using no-tags diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index 0a37310d0..d5f3f3e0b 100644 --- a/src/Resources/TortoiseProcENG.rc +++ b/src/Resources/TortoiseProcENG.rc @@ -3716,6 +3716,8 @@ BEGIN IDS_PROC_BROWSEREFS_EDITDESCRIPTION "Edit description" IDS_PROC_SYNC_CONFLICTS "Conflicts" IDS_STASHBUTTON "&Stash" + IDS_SETTINGS_FETCH_ADDEDREMOTE + "Do you want to fetch remote branches from the newly added remote?" END #endif // Englisch (USA) resources diff --git a/src/TortoiseProc/Settings/SettingGitRemote.cpp b/src/TortoiseProc/Settings/SettingGitRemote.cpp index 67bad622c..4e00aa402 100644 --- a/src/TortoiseProc/Settings/SettingGitRemote.cpp +++ b/src/TortoiseProc/Settings/SettingGitRemote.cpp @@ -25,6 +25,7 @@ #include "Settings.h" #include "GitAdminDir.h" #include "MessageBox.h" +#include "AppUtils.h" #include "git.h" // CSettingGitRemote dialog @@ -269,6 +270,8 @@ BOOL CSettingGitRemote::OnApply() this->m_ctrlRemoteList.AddString(m_strRemote); GetDlgItem(IDC_BUTTON_ADD)->EnableWindow(TRUE); + if (CMessageBox::Show(NULL, IDS_SETTINGS_FETCH_ADDEDREMOTE, IDS_APPNAME, MB_ICONQUESTION | MB_YESNO) == IDYES) + CCommonAppUtils::RunTortoiseProc(_T("/command:fetch /path:\"") + g_Git.m_CurrentDir + _T("\" /remote:\"") + m_strRemote + _T("\"")); } if(m_ChangedMask & REMOTE_URL) { diff --git a/src/TortoiseProc/resource.h b/src/TortoiseProc/resource.h index d1181b934..ff9c2539f 100644 --- a/src/TortoiseProc/resource.h +++ b/src/TortoiseProc/resource.h @@ -800,6 +800,7 @@ #define IDC_COMMIT_LIST 1372 #define IDC_LIST_REMOTE 1372 #define IDC_LIST_REF_LEAFS 1372 +#define IDS_SETTINGS_FETCH_ADDEDREMOTE 1372 #define IDC_NEWLINESCOLOR 1378 #define IDC_OLDLINESCOLOR 1380 #define IDC_TABSIZE 1381 -- 2.11.4.GIT