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>
This commit is contained in:
Sitaram Chamarty 2009-11-03 21:30:12 +05:30 committed by Paul Mackerras
parent 51a7e8b654
commit 70a5fc443a

3
gitk
View File

@ -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
}