Thread (12 messages) flat view 12 messages, 6 authors, 2016-06-15
STALE3732d

[PATCH] gitk: disable checkout of remote branch

From: Sitaram Chamarty <hidden>
Date: 2016-06-15 22:47:39
Subsystem: the rest · Maintainer: Linus Torvalds

At the command line, this gives you a detailed warning message, but the
GUI currently allows it without any fuss.

Since the GUI is often used by people much less familiar with git, it
seems reasonable to make the GUI more restrictive than the command line,
not less.

This prevents a lot of detached HEAD commits by new users.

Signed-off-by: Sitaram Chamarty <redacted>
---
 gitk |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/gitk b/gitk
index db5ec54..95e27d4 100755
--- a/gitk
+++ b/gitk
@@ -8897,6 +8897,9 @@ proc headmenu {x y id head} {
     set headmenuid $id
     set headmenuhead $head
     set state normal
+    if {[string match "remotes/*" $head]} {
+	set state disabled
+    }
     if {$head eq $mainhead} {
 	set state disabled
     }
-- 
1.6.5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help