From: Sitaram Chamarty Date: Tue, 3 Nov 2009 16:00:12 +0000 (+0530) Subject: gitk: Disable checkout of remote branches X-Git-Tag: v1.6.6-rc2~2^2~5 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/70a5fc443acbd1fe69cc21c10190375facabaf93?hp=--cc gitk: Disable checkout of remote branches At the command line, trying to check out a remote branch gives you a detailed warning message, but the gitk 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 Signed-off-by: Paul Mackerras --- 70a5fc443acbd1fe69cc21c10190375facabaf93 diff --git a/gitk b/gitk index 61771bd05c..5f06545763 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 }