git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-gui: guitools: add the path in the confirmation dialog for tools which needs one

From
Bert Wesarg <bert.wesarg@googlemail.com>
Date
Oct 20, 2011, 19:32 UTC
Message-ID
<2fef219736a0787ed864b5c18adf31f7a4e8acda.1319139139.git.bert.wesarg@googlemail.com>
Signed-off-by: Bert Wesarg <bert.wesarg@googlemail.com>
---
 lib/tools.tcl |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/tools.tcl b/lib/tools.tcl
index 95e6e55..39e08f0 100644
--- a/lib/tools.tcl
+++ b/lib/tools.tcl
@@ -87,8 +87,14 @@ proc tools_exec {fullname} {
 			return
 		}
 	} elseif {[is_config_true "guitool.$fullname.confirm"]} {
-		if {[ask_popup [mc "Are you sure you want to run %s?" $fullname]] ne {yes}} {
-			return
+		if {[is_config_true "guitool.$fullname.needsfile"]} {
+			if {[ask_popup [mc "Are you sure you want to run %s on file \"%s\"?" $fullname $current_diff_path]] ne {yes}} {
+				return
+			}
+		} else {
+			if {[ask_popup [mc "Are you sure you want to run %s?" $fullname]] ne {yes}} {
+				return
+			}
 		}
 	}
 
-- 
1.7.7.759.gfc8c6
Next: Pat Thoyts
Message 1 of 3 in “git-gui: guitools: add the path in the confirmation dialog for tools which needs one”
  1. git-gui: guitools: add the path in the confirmation dialog for tools which needs oneBert Wesarg, Oct 20, 2011
  2. Pat ThoytsOct 21, 2011
  3. Junio C HamanoOct 21, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.