TortoiseGit日本語言語ファイル作成
Revisión | 1796c9009969441c213659570379b89ca1c49b8a (tree) |
---|---|
Tiempo | 2009-06-28 20:49:31 |
Autor | Johan 't Hart <johanthart@gmai...> |
Commiter | Johan 't Hart |
Pull: Fixed bug that when pulling from the configured remote branch, git did not update the remote tracking branches.
the command:
git pull origin master
Does not update the remote tracking branches. The command
git pull origin
does.
This bug was introduced in commit 25bd4c961830590ffdb51202e935fd168b7b2484
@@ -103,11 +103,11 @@ BOOL CPullFetchDlg::OnInitDialog() | ||
103 | 103 | CString currentBranch = g_Git.GetSymbolicRef(); |
104 | 104 | CString configName; |
105 | 105 | configName.Format(L"branch.%s.remote", currentBranch); |
106 | - CString pullRemote = g_Git.GetConfigValue(configName); | |
106 | + CString pullRemote = m_configPullRemote = g_Git.GetConfigValue(configName); | |
107 | 107 | |
108 | 108 | //Select pull-branch from current branch |
109 | 109 | configName.Format(L"branch.%s.merge", currentBranch); |
110 | - CString pullBranch = CGit::StripRefName(g_Git.GetConfigValue(configName)); | |
110 | + CString pullBranch = m_configPullBranch = CGit::StripRefName(g_Git.GetConfigValue(configName)); | |
111 | 111 | m_RemoteBranch.AddString(pullBranch); |
112 | 112 | |
113 | 113 | if(pullRemote.IsEmpty()) |
@@ -158,7 +158,10 @@ void CPullFetchDlg::OnBnClickedOk() | ||
158 | 158 | if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_REMOTE_RD) |
159 | 159 | { |
160 | 160 | m_RemoteURL=m_Remote.GetString(); |
161 | - if(!m_IsPull) | |
161 | + if( !m_IsPull || | |
162 | + (m_configPullRemote == m_RemoteURL && m_configPullBranch == m_RemoteBranch.GetString() )) | |
163 | + //When fetching or when pulling from the configured tracking branch, dont explicitly set the remote branch name, | |
164 | + //because otherwise git will not update the remote tracking branches. | |
162 | 165 | m_RemoteBranchName.Empty(); |
163 | 166 | else |
164 | 167 | m_RemoteBranchName=m_RemoteBranch.GetString(); |
@@ -39,4 +39,7 @@ public: | ||
39 | 39 | CString m_RemoteBranchName; |
40 | 40 | afx_msg void OnStnClickedRemoteManage(); |
41 | 41 | afx_msg void OnBnClickedButtonBrowseRef(); |
42 | + | |
43 | + CString m_configPullRemote; | |
44 | + CString m_configPullBranch; | |
42 | 45 | }; |