Skip to contentSkip to conversation

git-gui: remove the garbage collection hint

PATCH New Beat Bolli 1 participant 1 message Jun 15, 2016 Library code

lore
Share & tools
lore

Beat Bolli

author
#0 lore raw

PATCH 1/1 git-gui: remove the garbage collection hint

Git core has had automatic garbage collection for a long time. Git-gui does not need a similar heuristic.

---
 git-gui.sh       |  3 ---
 lib/database.tcl | 26 --------------------------
 2 files changed, 29 deletions(-)
git-gui.sh +0 -3
index 11048c7..2866777 100755
@@ -4004,9 +4004,6 @@ after 1 {
 		$ui_comm configure -state disabled -background gray
 	}
 }
-if {[is_enabled multicommit] && ![is_config_false gui.gcwarning]} {
-	after 1000 hint_gc
-}
 if {[is_enabled retcode]} {
 	bind . <Destroy> {+terminate_me %W}
 }
lib/database.tcl +0 -26
index 1f187ed..808bdf6 100644
@@ -87,29 +87,3 @@ proc do_fsck_objects {} {
 	lappend cmd --strict
 	console::exec $w $cmd
 }
-
-proc hint_gc {} {
-	set ndirs 1
-	set limit 8
-	if {[is_Windows]} {
-		set ndirs 4
-		set limit 1
-	}
-
-	set count [llength [glob \
-		-nocomplain \
-		-- \
-		[gitdir objects 4\[0-[expr {$ndirs-1}]\]/*]]]
-
-	if {$count >= $limit * $ndirs} {
-		set objects_current [expr {$count * 256/$ndirs}]
-		if {[ask_popup \
-			[mc "This repository currently has approximately %i loose objects.
-
-To maintain optimal performance it is strongly recommended that you compress the database.
-
-Compress the database now?" $objects_current]] eq yes} {
-			do_gc
-		}
-	}
-}
Signature · 1 line
2.5.0.492.g918e48c