git-gui: Added repack database menu option, to invoke git repack.

Most users of git-gui probably shouldn't be invoking git repack directly;
instead we should be looking at how many loose objects they have and
how many active packs they have and making the decision for them.  But
that's more work to code, and there's always going to be discussion about
what is the right default threshold and how do we know that the user is
willing to do the repack when we decide its time, etc.

So instead we'll just keep it simple and offer up the menu option.

Unfortunately right now we get now progress indication back from
git-pack-objects as its being invoked not through a tty, which makes
it disable progress output and the git-repack.sh wrapper won't let us
pass through --progress.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
Shawn O. Pearce 2006-11-07 20:40:35 -05:00
Родитель 0fb8f9ce05
Коммит d1536c488e
1 изменённых файлов: 11 добавлений и 0 удалений

11
git-gui
Просмотреть файл

@ -1276,6 +1276,14 @@ proc do_gitk {} {
}
}
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_quit {} {
global gitdir ui_comm
@ -1406,6 +1414,9 @@ menu .mbar.project
.mbar.project add command -label Visualize \
-command do_gitk \
-font $mainfont
.mbar.project add command -label {Repack Database} \
-command do_repack \
-font $mainfont
.mbar.project add command -label Quit \
-command do_quit \
-accelerator $M1T-Q \