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 <spearce@spearce.org>
Shawn O. Pearce committed
Nov 7, 2006 at 21:43 UTC
0a462d67761b8178f09e23ef85a9298d1e19a2eb
1 file changed
+3
-1
git-gui
+3
-1
@@ -932,7 +932,7 @@ proc populate_remote_menu {m pfx op} {
932
}
933
934
proc populate_pull_menu {m} {
935
- global gitdir repo_config all_remotes mainfont
935
+ global gitdir repo_config all_remotes mainfont disable_on_lock
936
937
foreach remote $all_remotes {
938
set rb {}
@@ -961,6 +961,8 @@ proc populate_pull_menu {m} {
961
-label "Branch $rb_short from $remote..." \
962
-command [list pull_remote $remote $rb] \
963
-font $mainfont
964
+ lappend disable_on_lock \
965
+ [list $m entryconf [$m index last] -state]
966
}
967
}
968
}