From 56b0c1d2d93c2fdfe704c115626a3bbe95476304 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Thu, 22 Mar 2012 23:06:39 +0100 Subject: [PATCH] Fixed issue #1116: Make remote branch in pull dialog default to the current branch (or remote tracking branch) Signed-off-by: Sven Strickroth --- src/Changelog.txt | 1 + src/TortoiseProc/PullFetchDlg.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Changelog.txt b/src/Changelog.txt index c3b3f7390..2768fe618 100644 --- a/src/Changelog.txt +++ b/src/Changelog.txt @@ -9,6 +9,7 @@ * Fixed issue #1110: Tracking branches when you don't want to/incorrectly * Fixed issue #1115: Detached HEAD message has no cancel/abort option * Fixed issue #985: Correctly store status for view patch in commit dialog + * Fixed issue #1116: Make remote branch in pull dialog default to the current branch (or remote tracking branch) = Release 1.7.7.0 = == Features== diff --git a/src/TortoiseProc/PullFetchDlg.cpp b/src/TortoiseProc/PullFetchDlg.cpp index 3a904602a..07649d1d6 100644 --- a/src/TortoiseProc/PullFetchDlg.cpp +++ b/src/TortoiseProc/PullFetchDlg.cpp @@ -1,6 +1,6 @@ // TortoiseGit - a Windows shell extension for easy version control -// Copyright (C) 2008-2011 - TortoiseGit +// Copyright (C) 2008-2012 - TortoiseGit // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License @@ -187,7 +187,10 @@ void CPullFetchDlg::Refresh() //Select pull-branch from current branch configName.Format(L"branch.%s.merge", currentBranch); CString pullBranch = m_configPullBranch = CGit::StripRefName(g_Git.GetConfigValue(configName)); - m_RemoteBranch.AddString(pullBranch); + if (pullBranch.IsEmpty()) + m_RemoteBranch.AddString(currentBranch); + else + m_RemoteBranch.AddString(pullBranch); if(pullRemote.IsEmpty()) pullRemote = m_RemoteReg; -- 2.11.4.GIT