From: Johan 't Hart Date: Thu, 4 Jun 2009 23:03:20 +0000 (+0200) Subject: Commit: Made user able to push after successful commit X-Git-Url: http://git.sourceforge.jp/view?p=tortoisegit%2FTortoiseGitJp.git;a=commitdiff_plain;h=a12360284cef2f19ef670b8db587a1b02201cea2 Commit: Made user able to push after successful commit --- diff --git a/src/TortoiseProc/CommitDlg.cpp b/src/TortoiseProc/CommitDlg.cpp index fb5a5d0..0dbf8e6 100644 --- a/src/TortoiseProc/CommitDlg.cpp +++ b/src/TortoiseProc/CommitDlg.cpp @@ -34,6 +34,7 @@ #include "UnicodeUtils.h" #include "ProgressDlg.h" #include "ShellUpdater.h" +#include "Commands/PushCommand.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -501,13 +502,20 @@ void CCommitDlg::OnOK() progress.m_GitCmd=cmd; progress.m_bShowCommand = FALSE; // don't show the commit command progress.m_PreText = out; // show any output already generated in log window - progress.DoModal(); + progress.m_changeAbortButtonOnSuccessTo = "Push"; + DWORD userResponse = progress.DoModal(); if(progress.m_GitStatus) { bCloseCommitDlg = false; this->Refresh(); } + else if(userResponse == IDCANCEL) + { + //User pressed 'Push' button after successful commit. + PushCommand cmdPush; + cmdPush.Execute(); + } CFile::Remove(tempfile); }else