threads / patch / 19819

patchgit gui: remove warning when deleting correctly merged remote branch

Subject: [PATCH] git gui: remove warning when deleting correctly merged remote branch

## tl;dr

2 messages between Jun 15, 2009 and Aug 10, 2009. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Heiko Voigt· Jun 15, 2009, 21:19 UTC · lore

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.

Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
---
 git-gui/lib/remote_branch_delete.tcl |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
Show changes to git-gui/lib/remote_branch_delete.tcl +9 −7
diff --git a/git-gui/lib/remote_branch_delete.tcl b/git-gui/lib/remote_branch_delete.tcl
index 4e02fc0..31e0947 100644
--- a/git-gui/lib/remote_branch_delete.tcl
+++ b/git-gui/lib/remote_branch_delete.tcl
@@ -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
-- 
1.6.3.1.169.g33fd


----- End forwarded message -----
Shawn O. Pearce· Aug 10, 2009, 15:47 UTC · re: Heiko Voigt · lore

Re: [PATCH] git gui: remove warning when deleting correctly merged remote branch

Heiko Voigt <hvoigt@hvoigt.net> wrote:
Show 8 quoted lines
> 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.
> 
> Signed-off-by: Heiko Voigt <hvoigt@hvoigt.net>
> ---
>  git-gui/lib/remote_branch_delete.tcl |   16 +++++++++-------
>  1 files changed, 9 insertions(+), 7 deletions(-)
Thanks, applied.
 
-- 
Shawn.

← back to recent threads