From: Shawn O. Pearce Date: Wed, 8 Nov 2006 02:43:16 +0000 (-0500) Subject: git-gui: Disable pull menu items when the index is locked. X-Git-Tag: gitgui-0.6.0~274 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0a462d67761b8178f09e23ef85a9298d1e19a2eb;p=git.git git-gui: Disable pull menu items when the index is locked. If we have the index locked then no pull command is allowed to proceed (as it would fail to get the index lock itself). So disable the pull menu items when we are doing any index based operations. Signed-off-by: Shawn O. Pearce --- diff --git a/git-gui b/git-gui index 465c2f388..4041aaacd 100755 --- a/git-gui +++ b/git-gui @@ -932,7 +932,7 @@ proc populate_remote_menu {m pfx op} { } proc populate_pull_menu {m} { - global gitdir repo_config all_remotes mainfont + global gitdir repo_config all_remotes mainfont disable_on_lock foreach remote $all_remotes { set rb {} @@ -961,6 +961,8 @@ proc populate_pull_menu {m} { -label "Branch $rb_short from $remote..." \ -command [list pull_remote $remote $rb] \ -font $mainfont + lappend disable_on_lock \ + [list $m entryconf [$m index last] -state] } } }