aboutsummaryrefslogtreecommitdiff
path: root/git-gui
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2006-11-20 21:43:41 -0500
committerShawn O. Pearce <spearce@spearce.org>2006-11-21 00:22:34 -0500
commit444f92d097425e8d1043a14571ebfd82c1c3b0a5 (patch)
treecf04938f782f08b958b3422c36bd9bfa296b9b67 /git-gui
parentf18e40a1a60d506065b6cc0e45704ce29ea0a035 (diff)
downloadgit-444f92d097425e8d1043a14571ebfd82c1c3b0a5.tar.gz
git-444f92d097425e8d1043a14571ebfd82c1c3b0a5.tar.xz
git-gui: Allow users to run fsck-objects from the gui.
I recently found a need to run fsck-objects in a number of repositories that I also use git-gui against. Tossing in a menu option to invoke fsck-objects and have its output show up in a console window is simple enough to do. We probably need to enhance the console window used by fsck-objects, like to open up the Git fsck-objects manual page and let the user see what each message means (such as "dangling commit") and to also let the user invoke prune, to cleanup any such dangling objects. But right now I'm going to ignore that problem in favor of getting other more important features implemented. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui')
-rwxr-xr-xgit-gui13
1 files changed, 13 insertions, 0 deletions
diff --git a/git-gui b/git-gui
index d5738baf1..2aa82781e 100755
--- a/git-gui
+++ b/git-gui
@@ -1954,6 +1954,15 @@ proc do_repack {} {
console_exec $w $cmd
}
+proc do_fsck_objects {} {
+ set w [new_console "verify" "Verifying the object database"]
+ set cmd [list git fsck-objects]
+ lappend cmd --full
+ lappend cmd --cache
+ lappend cmd --strict
+ console_exec $w $cmd
+}
+
set is_quitting 0
proc do_quit {} {
@@ -2610,6 +2619,10 @@ if {!$single_commit} {
-command do_repack \
-font font_ui
+ .mbar.project add command -label {Verify Database} \
+ -command do_fsck_objects \
+ -font font_ui
+
if {$tcl_platform(platform) eq {windows}} {
.mbar.project add command \
-label {Create Desktop Icon} \