summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Shawn O. Pearce <spearce@spearce.org>2007-01-20 18:38:12 -0500
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2007-01-21 02:54:16 -0500
commit81c0f29a5633f6a9ab01e0e9ded5e1c6d715b70b (patch)
tree6ea5ad515fed8e6f7940af9b275814aae3338f83
parentgit-gui: Show all fetched branches for remote pulls. (diff)
downloadtgif-81c0f29a5633f6a9ab01e0e9ded5e1c6d715b70b.tar.xz
git-gui: Run git-gc rather than git-repack.
Now that git 1.5.0-rc1 and later has a 'git gc' command which performs all important repository management activites (including reflog pruning, repacking local objects, unnecessary loose object pruning and rerere cache expiration) we should run 'gc' when the user wants us to cleanup their object database for them. I think the name 'gc' is horrible for a GUI application like git-gui, so I'm labeling the menu action 'Compress Database' instead. Hopefully this will provide some clue to the user about what the action does. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rwxr-xr-xgit-gui14
1 files changed, 5 insertions, 9 deletions
diff --git a/git-gui b/git-gui
index 0c88e4c7c3..95c922b21e 100755
--- a/git-gui
+++ b/git-gui
@@ -2217,13 +2217,9 @@ proc do_gitk {revs} {
}
}
-proc do_repack {} {
- set w [new_console {repack} \
- {Repacking the object database}]
- set cmd [list git repack]
- lappend cmd -a
- lappend cmd -d
- console_exec $w $cmd
+proc do_gc {} {
+ set w [new_console {gc} {Compressing the object database}]
+ console_exec $w {git gc}
}
proc do_fsck_objects {} {
@@ -3033,8 +3029,8 @@ if {![is_MacOSX]} {
.mbar.repository add separator
if {!$single_commit} {
- .mbar.repository add command -label {Repack Database} \
- -command do_repack \
+ .mbar.repository add command -label {Compress Database} \
+ -command do_gc \
-font font_ui
.mbar.repository add command -label {Verify Database} \