summaryrefslogtreecommitdiff
path: root/lib/console.tcl
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2007-07-08 22:40:56 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-07-09 02:34:46 (GMT)
commitd41b43eb4c73044d0fff2057211fc78e4e7b2094 (patch)
treeebab56d146f4cafef1b1adf740949403329f71ea /lib/console.tcl
parent699d5601f59938d62ec2506f319c25a656a403da (diff)
downloadgit-d41b43eb4c73044d0fff2057211fc78e4e7b2094.zip
git-d41b43eb4c73044d0fff2057211fc78e4e7b2094.tar.gz
git-d41b43eb4c73044d0fff2057211fc78e4e7b2094.tar.bz2
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/console.tcl')
-rw-r--r--lib/console.tcl8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/console.tcl b/lib/console.tcl
index 297e8de..27a880e 100644
--- a/lib/console.tcl
+++ b/lib/console.tcl
@@ -173,6 +173,14 @@ method chain {cmdlist {ok 1}} {
}
}
+method insert {txt} {
+ if {![winfo exists $w.m.t]} {_init $this}
+ $w.m.t conf -state normal
+ $w.m.t insert end "$txt\n"
+ set console_cr [$w.m.t index {end -1c}]
+ $w.m.t conf -state disabled
+}
+
method done {ok} {
if {$ok} {
if {[winfo exists $w.m.s]} {