OSDN Git Service

Add no-commit option at merge dialog
authorFrank Li <lznuaa@gmail.com>
Mon, 19 Oct 2009 05:17:46 +0000 (13:17 +0800)
committerFrank Li <lznuaa@gmail.com>
Mon, 19 Oct 2009 05:17:46 +0000 (13:17 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/Resources/TortoiseProcENG.rc
src/TortoiseProc/Commands/MergeCommand.cpp
src/TortoiseProc/MergeDlg.cpp
src/TortoiseProc/MergeDlg.h
src/TortoiseProc/resource.h
src/TortoiseShell/resource.h
src/TortoiseShell/resourceshell.rc

index 9d4d196..352aed5 100644 (file)
Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ
index c4ff691..f3feefc 100644 (file)
@@ -30,6 +30,7 @@ bool MergeCommand::Execute()
                CString cmd;\r
                CString noff;\r
                CString squash;\r
+               CString nocommit;\r
                CString msg;\r
 \r
                if(dlg.m_bNoFF)\r
@@ -38,14 +39,18 @@ bool MergeCommand::Execute()
                if(dlg.m_bSquash)\r
                        squash=_T("--squash");\r
 \r
+               if(dlg.m_bNoCommit);\r
+                       nocommit=_T("--no-commit");\r
+\r
                if(!dlg.m_strLogMesage.IsEmpty())\r
                {       \r
                        msg+=_T("-m \"")+dlg.m_strLogMesage+_T("\"");\r
                }\r
-               cmd.Format(_T("git.exe merge %s %s %s %s"),\r
+               cmd.Format(_T("git.exe merge %s %s %s %s %s"),\r
                        msg,\r
                        noff,\r
                        squash,\r
+                       nocommit,\r
                        dlg.m_VersionName);\r
 \r
                CString output;\r
index 36b7cb6..78faada 100644 (file)
@@ -53,6 +53,7 @@ void CMergeDlg::DoDataExchange(CDataExchange* pDX)
 \r
        DDX_Check(pDX,IDC_CHECK_NOFF,this->m_bNoFF);\r
        DDX_Check(pDX,IDC_CHECK_SQUASH,this->m_bSquash);\r
+       DDX_Check(pDX,IDC_CHECK_NOCOMMIT,this->m_bNoCommit);\r
        DDX_Control(pDX, IDC_LOGMESSAGE, m_cLogMessage);\r
 }\r
 \r
index f01ae3e..eae6eff 100644 (file)
@@ -39,7 +39,7 @@ public:
 \r
        BOOL m_bSquash;\r
        BOOL m_bNoFF;\r
-\r
+       BOOL m_bNoCommit;\r
        //CString m_Base;\r
 \r
 \r
index 2c4545d..056a11c 100644 (file)
Binary files a/src/TortoiseProc/resource.h and b/src/TortoiseProc/resource.h differ
index 7de4d2f..fa6680f 100644 (file)
 #define IDC_LOCKED                      1002\r
 #define IDC_LAST_HASH                   1002\r
 #define IDC_REPOURL                     1003\r
-#define IDC_CURRENT_BRANCH              1003\r
+#define IDC_SHELL_CURRENT_BRANCH              1003\r
 #define IDC_CREVISION                   1004\r
 #define IDC_HEAD_SUBJECT                1004\r
 #define IDC_CDATE                       1005\r
 #define IDC_CONFIG_AUTOCRLF             11020\r
 #define IDC_EDITPROPERTIES              11021\r
 #define IDC_REPOURLUNESCAPED            11022\r
-#define IDC_REMOTE_BRANCH               11022\r
+#define IDC_SHELL_REMOTE_BRANCH               11022\r
 #define IDC_ESCAPEDURLLABEL             11023\r
 #define IDC_REPOUUID                    11024\r
 #define IDC_CONFIG_SAFECRLF             11024\r
index 99c3494..f7d910a 100644 (file)
@@ -112,9 +112,9 @@ CAPTION "Property Page"
 FONT 8, "MS Shell Dlg", 0, 0, 0x1\r
 BEGIN\r
     LTEXT           "Current Branch:",IDC_STATIC,4,9,59,8\r
-    EDITTEXT        IDC_CURRENT_BRANCH,91,9,142,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_TRANSPARENT\r
+    EDITTEXT        IDC_SHELL_CURRENT_BRANCH,91,9,142,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_TRANSPARENT\r
     LTEXT           "Tracked Remote Branch:",IDC_ESCAPEDURLLABEL,4,21,85,8\r
-    EDITTEXT        IDC_REMOTE_BRANCH,91,21,139,14,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER\r
+    EDITTEXT        IDC_SHELL_REMOTE_BRANCH,91,21,139,14,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER\r
     LTEXT           "HEAD:",IDC_STATIC,4,35,76,8\r
     EDITTEXT        IDC_HEAD_HASH,80,35,163,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_TRANSPARENT\r
     EDITTEXT        IDC_HEAD_SUBJECT,80,47,163,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER,WS_EX_TRANSPARENT\r