@matheusbsbs / matheus-bagliano / commits / 81c0f29a56
Fork 0

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>

Shawn O. Pearce committed Jan 20, 2007 at 18:38 UTC 81c0f29a5633f6a9ab01e0e9ded5e1c6d715b70b
1 file changed +5 -9
git-gui
+5 -9
@@ -2217,13 +2217,9 @@ proc do_gitk {revs} {
2217 }
2218 }
2219
2220 -proc do_repack {} {
2221 - set w [new_console {repack} \
2222 - {Repacking the object database}]
2223 - set cmd [list git repack]
2224 - lappend cmd -a
2225 - lappend cmd -d
2226 - console_exec $w $cmd
2220 +proc do_gc {} {
2221 + set w [new_console {gc} {Compressing the object database}]
2222 + console_exec $w {git gc}
2223 }
2224
2225 proc do_fsck_objects {} {
@@ -3033,8 +3029,8 @@ if {![is_MacOSX]} {
3029 .mbar.repository add separator
3030
3031 if {!$single_commit} {
3036 - .mbar.repository add command -label {Repack Database} \
3037 - -command do_repack \
3032 + .mbar.repository add command -label {Compress Database} \
3033 + -command do_gc \
3034 -font font_ui
3035
3036 .mbar.repository add command -label {Verify Database} \