Skip to content

Commit

Permalink
git-gui: Make sure remotes are loaded when picking revisions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shawn O. Pearce committed Jul 30, 2007
1 parent 0fe055c commit 95af4d8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/choose_rev.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}} {
Expand Down

0 comments on commit 95af4d8

Please sign in to comment.