OSDN Git Service

Fix issue 36, Push not working if no remote branch is specified
authorColin Law <colin@clanlaw.org.uk>
Sun, 8 Feb 2009 11:22:31 +0000 (11:22 +0000)
committerFrank Li <lznuaa@gmail.com>
Sun, 8 Feb 2009 11:48:42 +0000 (19:48 +0800)
If no remote branch is specified the push fails due to trailing ':' on Command
passed to git.exe
Also corrected typo on push dialog

src/Resources/TortoiseProcENG.rc
src/TortoiseProc/Commands/PushCommand.cpp

index 3c1fb48..cf78dfa 100644 (file)
Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ
index 9dbf656..16317e9 100644 (file)
@@ -47,11 +47,14 @@ bool PushCommand::Execute()
                if(dlg.m_bForce)\r
                        force=_T("--force");\r
                \r
-               cmd.Format(_T("git.exe push %s %s %s \"%s\" %s:%s"),\r
+               cmd.Format(_T("git.exe push %s %s %s \"%s\" %s"),\r
                                thin,tags,force,\r
                                dlg.m_URL,\r
-                               dlg.m_BranchSourceName,\r
-                               dlg.m_BranchRemoteName);\r
+                               dlg.m_BranchSourceName);\r
+               if (!dlg.m_BranchRemoteName.IsEmpty())\r
+               {\r
+                       cmd += _T(":") + dlg.m_BranchRemoteName;\r
+               }\r
 \r
                CProgressDlg progress;\r
                progress.m_GitCmd=cmd;\r