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

[PATCH v2 2/2] gitk: add an option to run gitk on an item in the file list

From
Alex Riesen <alexander.riesen@cetitec.com>
Date
May 9, 2018, 11:00 UTC
Message-ID
<20180509110058.5gwmxmai4mohui65@pflmari>
In-Reply-To
<cover.1525862998.git.raa.lkml@gmail.com>
From: Alex Riesen <raa.lkml@gmail.com>
Similar to a git gui feature which visualizes history in a submodule,
the submodules cause the gitk be started inside the submodule.
---
 gitk | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff --git a/gitk b/gitk
index 742f36b..c430dfe 100755
--- a/gitk
+++ b/gitk
@@ -2682,6 +2682,7 @@ proc makewindow {} {
 	{mc "External diff" command {external_diff}}
 	{mc "Blame parent commit" command {external_blame 1}}
 	{mc "Copy path" command {clipboard clear; clipboard append $flist_menu_file}}
+	{mc "Run gitk on this" command {flist_gitk}}
     }
     $flist_menu configure -tearoff 0
 
@@ -3555,6 +3556,17 @@ proc flist_hl {only} {
     set gdttype [mc "touching paths:"]
 }
 
+proc flist_gitk {} {
+    global flist_menu_file findstring gdttype
+
+    set x [shellquote $flist_menu_file]
+    if {[file isdirectory $flist_menu_file]} {
+	exec sh -c "cd $x&&gitk" &
+    } else {
+	exec gitk -- $x &
+    }
+}
+
 proc gitknewtmpdir {} {
     global diffnum gitktmpdir gitdir env
 
-- 
2.17.0.593.g2029711e64

---
Diese E-Mail wurde von Avast Antivirus-Software auf Viren geprüft.
https://www.avast.com/antivirus
Previous: Alex Riesen
Message 2 of 2 in “gitk: show part of submodule log instead of empty pane when listing trees”
  1. 1/2 gitk: show part of submodule log instead of empty pane when listing treesAlex Riesen, May 9, 2018
  2. 2/2 gitk: add an option to run gitk on an item in the file listAlex Riesen, May 9, 2018

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.