Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-12-10 02:38:51 +0300
committerJunio C Hamano <gitster@pobox.com>2009-12-10 02:38:51 +0300
commit529f8c6ea6c13d85178d4ed10ed60ed8fd6f6c19 (patch)
tree4d4f9f8a8de0c0a3bc618873fc91d399dd1a712d /git-gui/lib/database.tcl
parent47344eee9b980a7cf2a08d040ff3dd38c6cd82ec (diff)
parent60204ddb99187dd329000864a618e57742372d74 (diff)
Merge git://repo.or.cz/git-gui
* git://repo.or.cz/git-gui: git-gui: suppress RenderBadPicture X error caused by Tk bug git-gui: Increase blame viewer usability on MacOS. git-gui: search 4 directories to improve statistic of gc hint git gui: make current branch default in "remote delete branch" merge check
Diffstat (limited to 'git-gui/lib/database.tcl')
-rw-r--r--git-gui/lib/database.tcl21
1 files changed, 10 insertions, 11 deletions
diff --git a/git-gui/lib/database.tcl b/git-gui/lib/database.tcl
index a18ac8b430..d4e0bed0b6 100644
--- a/git-gui/lib/database.tcl
+++ b/git-gui/lib/database.tcl
@@ -89,27 +89,26 @@ proc do_fsck_objects {} {
}
proc hint_gc {} {
- set object_limit 8
+ set ndirs 1
+ set limit 8
if {[is_Windows]} {
- set object_limit 1
+ set ndirs 4
+ set limit 1
}
- set objects_current [llength [glob \
- -directory [gitdir objects 42] \
+ set count [llength [glob \
-nocomplain \
- -tails \
-- \
- *]]
+ [gitdir objects 4\[0-[expr {$ndirs-1}]\]/*]]]
- if {$objects_current >= $object_limit} {
- set objects_current [expr {$objects_current * 250}]
- set object_limit [expr {$object_limit * 250}]
+ 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 when more than %i loose objects exist.
+To maintain optimal performance it is strongly recommended that you compress the database.
-Compress the database now?" $objects_current $object_limit]] eq yes} {
+Compress the database now?" $objects_current]] eq yes} {
do_gc
}
}