summaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaramc@gmail.com>2009-11-03 21:30:12 +0530
committerPaul Mackerras <paulus@samba.org>2009-11-14 21:19:11 +1100
commit70a5fc443acbd1fe69cc21c10190375facabaf93 (patch)
treeedf0a31fb25a97e9b6d21b204f47446464bede0a /gitk
parent51a7e8b654a0f06dde6f66ae89a35297cea09168 (diff)
downloadgit-70a5fc443acbd1fe69cc21c10190375facabaf93.tar.gz
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 <sitaramc@gmail.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk3
1 files changed, 3 insertions, 0 deletions
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
}