Code

git-gui: Report less precise object estimates for database compression
authorJohannes Sixt <johannes.sixt@telecom.at>
Mon, 14 Apr 2008 08:51:33 +0000 (10:51 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Mon, 14 Apr 2008 23:34:23 +0000 (19:34 -0400)
On startup, git-gui warns if there are many loose objects. It does so by
saying, e.g., that there are "approximately 768 loose objects". But isn't
"768" a very accurate number? Lets say "750", which (while still being a
very precise number) sounds much more like an estimation.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
lib/database.tcl

index d66aa3fe3367e0a8db0ee5c90925352a3a143198..a18ac8b4308d8263a0688058524282b72bafe77a 100644 (file)
@@ -102,8 +102,8 @@ proc hint_gc {} {
                *]]
 
        if {$objects_current >= $object_limit} {
-               set objects_current [expr {$objects_current * 256}]
-               set object_limit    [expr {$object_limit    * 256}]
+               set objects_current [expr {$objects_current * 250}]
+               set object_limit    [expr {$object_limit    * 250}]
                if {[ask_popup \
                        [mc "This repository currently has approximately %i loose objects.