git-gui: Move console procs into their own namespace

To help modularize git-gui better I'm isolating the code and
variables required to handle our little console windows into
their own namespace.  This way we can say console::new rather
than new_console, and the hidden internal procs to create the
window and read data from our filehandle are off in their own
private little land, where most users don't see them.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce
2007-05-01 02:59:53 -04:00
parent f522c9b5ed
commit a35d65d9c8
4 changed files with 57 additions and 39 deletions

View File

@ -69,21 +69,21 @@ proc do_stats {} {
}
proc do_gc {} {
set w [new_console {gc} {Compressing the object database}]
console_chain {
{console_exec {git pack-refs --prune}}
{console_exec {git reflog expire --all}}
{console_exec {git repack -a -d -l}}
{console_exec {git rerere gc}}
set w [console::new {gc} {Compressing the object database}]
console::chain {
{exec {git pack-refs --prune}}
{exec {git reflog expire --all}}
{exec {git repack -a -d -l}}
{exec {git rerere gc}}
} $w
}
proc do_fsck_objects {} {
set w [new_console {fsck-objects} \
set w [console::new {fsck-objects} \
{Verifying the object database with fsck-objects}]
set cmd [list git fsck-objects]
lappend cmd --full
lappend cmd --cache
lappend cmd --strict
console_exec $w $cmd console_done
console::exec $w $cmd
}