From 94f3376661d9b3e54c429d7318a314c939880250 Mon Sep 17 00:00:00 2001 From: Michael Seibt Date: Wed, 28 Dec 2022 22:51:49 +0100 Subject: [PATCH 1/4] FormCommit: Add button text "Commit & force push" (#10587) --- GitUI/CommandsDialogs/FormCommit.cs | 6 +++++- GitUI/Translation/English.xlf | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/GitUI/CommandsDialogs/FormCommit.cs b/GitUI/CommandsDialogs/FormCommit.cs index e5b01ac7949..4386dff6bda 100644 --- a/GitUI/CommandsDialogs/FormCommit.cs +++ b/GitUI/CommandsDialogs/FormCommit.cs @@ -44,6 +44,8 @@ public sealed partial class FormCommit : GitModuleForm private readonly TranslationString _commitAndPush = new("Commit && &push"); + private readonly TranslationString _commitAndForcePush = new("Commit && force &push"); + private readonly TranslationString _deleteFailed = new("Delete file failed"); private readonly TranslationString _deleteSelectedFiles = @@ -3360,7 +3362,9 @@ private void stopTrackingThisFileToolStripMenuItem_Click(object sender, EventArg private void SetCommitAndPushText() { - CommitAndPush.Text = Reset.Enabled || Amend.Checked ? _commitAndPush.Text : TranslatedStrings.ButtonPush; + CommitAndPush.Text = Amend.Checked && AppSettings.CommitAndPushForcedWhenAmend ? _commitAndForcePush.Text + : Reset.Enabled || Amend.Checked ? _commitAndPush.Text + : TranslatedStrings.ButtonPush; } internal TestAccessor GetTestAccessor() diff --git a/GitUI/Translation/English.xlf b/GitUI/Translation/English.xlf index 0456569da3a..2cabe74a40f 100644 --- a/GitUI/Translation/English.xlf +++ b/GitUI/Translation/English.xlf @@ -3452,6 +3452,10 @@ Use this feature when a file is big and never change. Git will never check if the file has changed that will improve status check performance. + + Commit && force &push + + Commit && &push From 2a35af0b3c0eb2aeea6e1748184d5be28a66d688 Mon Sep 17 00:00:00 2001 From: Michael Seibt Date: Sun, 11 Dec 2022 19:00:30 +0100 Subject: [PATCH 2/4] FormCommit: Fixup capitalization (#10587) --- GitUI/CommandsDialogs/FormCommit.Designer.cs | 4 ++-- GitUI/Translation/English.xlf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/GitUI/CommandsDialogs/FormCommit.Designer.cs b/GitUI/CommandsDialogs/FormCommit.Designer.cs index cbdb7c1a95a..d5056cbaac8 100644 --- a/GitUI/CommandsDialogs/FormCommit.Designer.cs +++ b/GitUI/CommandsDialogs/FormCommit.Designer.cs @@ -1164,7 +1164,7 @@ private void InitializeComponent() this.Amend.Name = "Amend"; this.Amend.Size = new System.Drawing.Size(97, 17); this.Amend.TabIndex = 0; - this.Amend.Text = "&Amend Commit"; + this.Amend.Text = "&Amend commit"; this.Amend.UseVisualStyleBackColor = true; this.Amend.CheckedChanged += new System.EventHandler(this.Amend_CheckedChanged); // @@ -1176,7 +1176,7 @@ private void InitializeComponent() this.ResetAuthor.Name = "ResetAuthor"; this.ResetAuthor.Size = new System.Drawing.Size(97, 17); this.ResetAuthor.TabIndex = 0; - this.ResetAuthor.Text = "R&eset Author"; + this.ResetAuthor.Text = "R&eset author"; this.ResetAuthor.UseVisualStyleBackColor = true; this.ResetAuthor.Visible = false; // diff --git a/GitUI/Translation/English.xlf b/GitUI/Translation/English.xlf index 2cabe74a40f..e7eca11f3b8 100644 --- a/GitUI/Translation/English.xlf +++ b/GitUI/Translation/English.xlf @@ -3387,7 +3387,7 @@ gitex.cmd / gitex (located in the same folder as GitExtensions.exe): - &Amend Commit + &Amend commit @@ -3407,7 +3407,7 @@ gitex.cmd / gitex (located in the same folder as GitExtensions.exe): - R&eset Author + R&eset author From 0544b23023b5babe3bb96ab447029585620b9923 Mon Sep 17 00:00:00 2001 From: Michael Seibt Date: Thu, 10 Nov 2022 23:00:00 +0100 Subject: [PATCH 3/4] FormCommit: Make mnemonic Alt+T unique (#10587) --- GitUI/CommandsDialogs/FormCommit.Designer.cs | 2 +- GitUI/Translation/English.xlf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GitUI/CommandsDialogs/FormCommit.Designer.cs b/GitUI/CommandsDialogs/FormCommit.Designer.cs index d5056cbaac8..8cba06579af 100644 --- a/GitUI/CommandsDialogs/FormCommit.Designer.cs +++ b/GitUI/CommandsDialogs/FormCommit.Designer.cs @@ -1190,7 +1190,7 @@ private void InitializeComponent() this.StashStaged.Size = new System.Drawing.Size(171, 26); this.StashStaged.TabIndex = 14; this.StashStaged.TabStop = false; - this.StashStaged.Text = "S&tash staged changes"; + this.StashStaged.Text = "Stas&h staged changes"; this.StashStaged.UseVisualStyleBackColor = true; this.StashStaged.Click += new System.EventHandler(this.StashStagedClick); // diff --git a/GitUI/Translation/English.xlf b/GitUI/Translation/English.xlf index e7eca11f3b8..a9e7806da80 100644 --- a/GitUI/Translation/English.xlf +++ b/GitUI/Translation/English.xlf @@ -3428,7 +3428,7 @@ gitex.cmd / gitex (located in the same folder as GitExtensions.exe): - S&tash staged changes + Stas&h staged changes From 4cb3e5d14710123d8d26fc26865016f3e4010c45 Mon Sep 17 00:00:00 2001 From: Michael Seibt Date: Mon, 31 Oct 2022 21:43:54 +0100 Subject: [PATCH 4/4] FormCommit: Support Tab for buttons (#10587) --- GitUI/CommandsDialogs/FormCommit.Designer.cs | 25 ++++++++------------ 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/GitUI/CommandsDialogs/FormCommit.Designer.cs b/GitUI/CommandsDialogs/FormCommit.Designer.cs index 8cba06579af..8345f924a8c 100644 --- a/GitUI/CommandsDialogs/FormCommit.Designer.cs +++ b/GitUI/CommandsDialogs/FormCommit.Designer.cs @@ -382,7 +382,7 @@ private void InitializeComponent() this.StageInSuperproject.Margin = new System.Windows.Forms.Padding(0, 9, 0, 3); this.StageInSuperproject.Name = "StageInSuperproject"; this.StageInSuperproject.Size = new System.Drawing.Size(130, 17); - this.StageInSuperproject.TabIndex = 13; + this.StageInSuperproject.TabIndex = 103; this.StageInSuperproject.Text = "Stage &in Superproject"; this.fileTooltip.SetToolTip(this.StageInSuperproject, "Stage current submodule in superproject after commit"); this.StageInSuperproject.UseVisualStyleBackColor = true; @@ -1126,7 +1126,7 @@ private void InitializeComponent() this.flowCommitButtons.Name = "flowCommitButtons"; this.tableLayoutPanel1.SetRowSpan(this.flowCommitButtons, 2); this.flowCommitButtons.Size = new System.Drawing.Size(171, 192); - this.flowCommitButtons.TabIndex = 1; + this.flowCommitButtons.TabIndex = 100; this.flowCommitButtons.WrapContents = false; // // Commit @@ -1137,8 +1137,7 @@ private void InitializeComponent() this.Commit.Margin = new System.Windows.Forms.Padding(0, 0, 0, 3); this.Commit.Name = "Commit"; this.Commit.Size = new System.Drawing.Size(171, 26); - this.Commit.TabIndex = 1; - this.Commit.TabStop = false; + this.Commit.TabIndex = 101; this.Commit.Text = "&Commit"; this.Commit.UseVisualStyleBackColor = true; this.Commit.Click += new System.EventHandler(this.CommitClick); @@ -1151,8 +1150,7 @@ private void InitializeComponent() this.CommitAndPush.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.CommitAndPush.Name = "CommitAndPush"; this.CommitAndPush.Size = new System.Drawing.Size(171, 26); - this.CommitAndPush.TabIndex = 9; - this.CommitAndPush.TabStop = false; + this.CommitAndPush.TabIndex = 102; this.CommitAndPush.UseVisualStyleBackColor = true; this.CommitAndPush.Click += new System.EventHandler(this.CommitAndPush_Click); // @@ -1163,7 +1161,7 @@ private void InitializeComponent() this.Amend.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.Amend.Name = "Amend"; this.Amend.Size = new System.Drawing.Size(97, 17); - this.Amend.TabIndex = 0; + this.Amend.TabIndex = 104; this.Amend.Text = "&Amend commit"; this.Amend.UseVisualStyleBackColor = true; this.Amend.CheckedChanged += new System.EventHandler(this.Amend_CheckedChanged); @@ -1175,7 +1173,7 @@ private void InitializeComponent() this.ResetAuthor.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.ResetAuthor.Name = "ResetAuthor"; this.ResetAuthor.Size = new System.Drawing.Size(97, 17); - this.ResetAuthor.TabIndex = 0; + this.ResetAuthor.TabIndex = 105; this.ResetAuthor.Text = "R&eset author"; this.ResetAuthor.UseVisualStyleBackColor = true; this.ResetAuthor.Visible = false; @@ -1188,8 +1186,7 @@ private void InitializeComponent() this.StashStaged.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.StashStaged.Name = "StashStaged"; this.StashStaged.Size = new System.Drawing.Size(171, 26); - this.StashStaged.TabIndex = 14; - this.StashStaged.TabStop = false; + this.StashStaged.TabIndex = 107; this.StashStaged.Text = "Stas&h staged changes"; this.StashStaged.UseVisualStyleBackColor = true; this.StashStaged.Click += new System.EventHandler(this.StashStagedClick); @@ -1202,8 +1199,7 @@ private void InitializeComponent() this.Reset.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.Reset.Name = "Reset"; this.Reset.Size = new System.Drawing.Size(171, 26); - this.Reset.TabIndex = 11; - this.Reset.TabStop = false; + this.Reset.TabIndex = 108; this.Reset.Text = "&Reset all changes"; this.Reset.UseVisualStyleBackColor = true; this.Reset.Click += new System.EventHandler(this.ResetClick); @@ -1216,8 +1212,7 @@ private void InitializeComponent() this.ResetUnStaged.Margin = new System.Windows.Forms.Padding(0, 3, 0, 3); this.ResetUnStaged.Name = "ResetUnStaged"; this.ResetUnStaged.Size = new System.Drawing.Size(171, 26); - this.ResetUnStaged.TabIndex = 14; - this.ResetUnStaged.TabStop = false; + this.ResetUnStaged.TabIndex = 109; this.ResetUnStaged.Text = "Reset u&nstaged changes"; this.ResetUnStaged.UseVisualStyleBackColor = true; this.ResetUnStaged.Click += new System.EventHandler(this.ResetUnStagedClick); @@ -1240,7 +1235,7 @@ private void InitializeComponent() this.toolbarCommit.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; this.toolbarCommit.Size = new System.Drawing.Size(340, 28); this.toolbarCommit.Stretch = true; - this.toolbarCommit.TabIndex = 5; + this.toolbarCommit.TabIndex = 110; // // commitMessageToolStripMenuItem //