Thread (12 messages) flat view 12 messages, 2 authors, 2016-06-15
STALE3752d

Revision v1 of 2 in this series.

Revisions (2)
  1. v1 [diff vs current]
  2. v1 current

[PATCH 2/2] gitk: Show the rev(s) the user specified on the command line in the window title.

From: Marc Branchaud <hidden>
Date: 2016-06-15 23:04:16
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Marc Branchaud <redacted>
---

I often open multiple gitk windows in the same working directory to examine
other branches or refs in the repo.  This change allows me to distinguish
which window is showing what.

		M.

 gitk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/gitk b/gitk
index b859879..379b13a 100755
--- a/gitk
+++ b/gitk
@@ -488,7 +488,7 @@ proc reset_pending_select {selid} {
 }
 
 proc getcommits {selid} {
-    global canv curview need_redisplay viewactive
+    global appname canv curview need_redisplay viewactive vrevs
 
     initlayout
     if {[start_rev_list $curview]} {
@@ -498,6 +498,11 @@ proc getcommits {selid} {
     } else {
 	show_status [mc "No commits selected"]
     }
+    set rev "$vrevs($curview)"
+    if {$rev eq ""} {
+	set rev "HEAD"
+    }
+    wm title . "[reponame]: $rev - $appname"
 }
 
 proc updatecommits {} {
-- 
2.3.3
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help