• R/O
  • HTTP
  • SSH
  • HTTPS

TortoiseGitJp: Commit

TortoiseGit日本語言語ファイル作成


Commit MetaInfo

Revisión1796c9009969441c213659570379b89ca1c49b8a (tree)
Tiempo2009-06-28 20:49:31
AutorJohan 't Hart <johanthart@gmai...>
CommiterJohan 't Hart

Log Message

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

Cambiar Resumen

Diferencia incremental

--- a/src/TortoiseProc/PullFetchDlg.cpp
+++ b/src/TortoiseProc/PullFetchDlg.cpp
@@ -103,11 +103,11 @@ BOOL CPullFetchDlg::OnInitDialog()
103103 CString currentBranch = g_Git.GetSymbolicRef();
104104 CString configName;
105105 configName.Format(L"branch.%s.remote", currentBranch);
106- CString pullRemote = g_Git.GetConfigValue(configName);
106+ CString pullRemote = m_configPullRemote = g_Git.GetConfigValue(configName);
107107
108108 //Select pull-branch from current branch
109109 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));
111111 m_RemoteBranch.AddString(pullBranch);
112112
113113 if(pullRemote.IsEmpty())
@@ -158,7 +158,10 @@ void CPullFetchDlg::OnBnClickedOk()
158158 if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_REMOTE_RD)
159159 {
160160 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.
162165 m_RemoteBranchName.Empty();
163166 else
164167 m_RemoteBranchName=m_RemoteBranch.GetString();
--- a/src/TortoiseProc/PullFetchDlg.h
+++ b/src/TortoiseProc/PullFetchDlg.h
@@ -39,4 +39,7 @@ public:
3939 CString m_RemoteBranchName;
4040 afx_msg void OnStnClickedRemoteManage();
4141 afx_msg void OnBnClickedButtonBrowseRef();
42+
43+ CString m_configPullRemote;
44+ CString m_configPullBranch;
4245 };
Show on old repository browser