aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-07-29 21:26:42 -0400
committerShawn O. Pearce <spearce@spearce.org>2007-07-29 23:44:51 -0400
commit95af4d8de16e8e681c196fce6d42e40909933115 (patch)
treefb138315b9a6c808d913bfbfff87ef1233194b72
parent0fe055cd2480763393b20676a10fd0bea56b2fc2 (diff)
downloadgit-95af4d8de16e8e681c196fce6d42e40909933115.tar.gz
git-95af4d8de16e8e681c196fce6d42e40909933115.tar.xz
git-gui: Make sure remotes are loaded when picking revisions
If we are started for only a blame/browser/citool run we don't usually initialize the list of remotes, or determine which refs are tracking branches and which are local branch heads. This is because some of that work is relatively expensive and is usually not going to be needed if we are started only for a blame, or to make a single commit. However by not loading the remote configuration we were crashing if the user tried to open a browser for another branch through the Repository menu, as our load_all_heads procedure was unable to decide which refs/heads/ items were actually local heads. We now force all remote configuration data to be loaded if we have not done so already and we are trying to create a revision mega widget. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r--lib/choose_rev.tcl4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/choose_rev.tcl b/lib/choose_rev.tcl
index 4147b7c5b..ec064b3e1 100644
--- a/lib/choose_rev.tcl
+++ b/lib/choose_rev.tcl
@@ -34,6 +34,10 @@ proc new_unmerged {path {title {}}} {
constructor _new {path unmerged_only title} {
global current_branch is_detached
+ if {![info exists ::all_remotes]} {
+ load_all_remotes
+ }
+
set w $path
if {$title ne {}} {