From: Beat Bolli <dev+git@drbeat.li>
To: git@vger.kernel.org
Cc: Beat Bolli <dev+git@drbeat.li>,
Pat Thoyts <patthoyts@users.sourceforge.net>
Subject: [PATCH] git-gui: remove the garbage collection hint
Date: Tue, 29 Sep 2015 19:33:59 +0200 [thread overview]
Message-ID: <1443548039-16276-1-git-send-email-dev+git@drbeat.li> (raw)
Git core has had automatic garbage collection for a long time.
Git-gui does not need a similar heuristic.
Signed-off-by: Beat Bolli <dev+git@drbeat.li>
Cc: Pat Thoyts <patthoyts@users.sourceforge.net>
---
git-gui.sh | 3 ---
lib/database.tcl | 26 --------------------------
2 files changed, 29 deletions(-)
diff --git a/git-gui.sh b/git-gui.sh
index 11048c7..2866777 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -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}
}
diff --git a/lib/database.tcl b/lib/database.tcl
index 1f187ed..808bdf6 100644
--- a/lib/database.tcl
+++ b/lib/database.tcl
@@ -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
- }
- }
-}
--
2.5.0.492.g918e48c
reply other threads:[~2015-09-29 17:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1443548039-16276-1-git-send-email-dev+git@drbeat.li \
--to=dev+git@drbeat.li \
--cc=git@vger.kernel.org \
--cc=patthoyts@users.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.