diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-07-09 00:40:56 +0200 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-07-09 04:34:46 +0200 |
commit | d41b43eb4c73044d0fff2057211fc78e4e7b2094 (patch) | |
tree | ebab56d146f4cafef1b1adf740949403329f71ea /lib/transport.tcl | |
parent | git-gui: Refactor our ui_status_value update technique (diff) | |
download | git-d41b43eb4c73044d0fff2057211fc78e4e7b2094.tar.xz git-d41b43eb4c73044d0fff2057211fc78e4e7b2094.zip |
git-gui: Refactor branch switch to support detached head
This is a major rewrite of the way we perform switching between
branches and the subsequent update of the working directory. Like
core Git we now use a single code path to perform all changes: our
new checkout_op class. We also use it for branch creation/update
as it integrates the tracking branch fetch process along with a
very basic merge (fast-forward and reset only currently).
Because some users have literally hundreds of local branches we
use the standard revision picker (with its branch filtering tool)
to select the local branch, rather than keeping all of the local
branches in the Branch menu. The branch menu listing out all of
the available branches is simply not sane for those types of huge
repositories.
Users can now checkout a detached head by ticking off the option
in the checkout dialog. This option is off by default for the
obvious reason, but it can be easily enabled for any local branch
by simply checking it. We also detach the head if any non local
branch was selected, or if a revision expression was entered.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/transport.tcl')
-rw-r--r-- | lib/transport.tcl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/transport.tcl b/lib/transport.tcl index e8ebc6eda0..3a22bd40d4 100644 --- a/lib/transport.tcl +++ b/lib/transport.tcl @@ -74,7 +74,7 @@ trace add variable push_remote write \ [list radio_selector push_urltype remote] proc do_push_anywhere {} { - global all_heads all_remotes current_branch + global all_remotes current_branch global push_urltype push_remote push_url push_thin push_tags set w .push_setup @@ -101,7 +101,7 @@ proc do_push_anywhere {} { -width 70 \ -selectmode extended \ -yscrollcommand [list $w.source.sby set] - foreach h $all_heads { + foreach h [load_all_heads] { $w.source.l insert end $h if {$h eq $current_branch} { $w.source.l select set end |