Skip to contentSkip to conversation

git gui: remove warning when deleting correctly merged remote branch

PATCH Applied Heiko Voigt 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git gui: remove warning when deleting correctly merged remote branch

If the user wants to delete a remote branch and selects the correct "merged into" we should not warn that "Recovering deleted branches is difficult". For local branches we do the same already.

---
 git-gui/lib/remote_branch_delete.tcl |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
git-gui/lib/remote_branch_delete.tcl +9 -7
index 4e02fc0..31e0947 100644
@@ -208,13 +208,15 @@ method _delete {} {
 		return
 	}
 
-	if {[tk_messageBox \
-		-icon warning \
-		-type yesno \
-		-title [wm title $w] \
-		-parent $w \
-		-message [mc "Recovering deleted branches is difficult.\n\nDelete the selected branches?"]] ne yes} {
-		return
+	if {$checktype ne {head}} {
+		if {[tk_messageBox \
+			-icon warning \
+			-type yesno \
+			-title [wm title $w] \
+			-parent $w \
+			-message [mc "Recovering deleted branches is difficult.\n\nDelete the selected branches?"]] ne yes} {
+			return
+		}
 	}
 
 	destroy $w
Signature · 4 lines
1.6.3.1.169.g33fd


----- End forwarded message -----
#1 lore raw
Quoted 8 lines · Heiko Voigt

If the user wants to delete a remote branch and selects the correct "merged into" we should not warn that "Recovering deleted branches is difficult". For local branches we do the same already.

---
 git-gui/lib/remote_branch_delete.tcl |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

Thanks, applied.

Signature · 1 line
Shawn.