aboutsummaryrefslogtreecommitdiff
path: root/git-gui/lib/branch_rename.tcl
diff options
context:
space:
mode:
authorClemens Buchacher <drizzd@aon.at>2009-09-14 00:20:44 +0200
committerShawn O. Pearce <spearce@spearce.org>2009-12-05 13:48:03 -0800
commit88520cadf902c8bc780394e1ddecc726534c3df9 (patch)
tree4908079711db9510ef70abb7c4639b24b0572029 /git-gui/lib/branch_rename.tcl
parentc0d153295c6f9140e644aa740f588257aac1f825 (diff)
downloadgit-88520cadf902c8bc780394e1ddecc726534c3df9.tar.gz
git-88520cadf902c8bc780394e1ddecc726534c3df9.tar.xz
git-gui: search 4 directories to improve statistic of gc hint
On Windows, git-gui suggests running the garbage collector if it finds 1 or more files in .git/objects/42 (as opposed to 8 files on other platforms). The probability of that happening if the repo contains about 100 loose objects is 32%. The probability for the same to happen when searching 4 directories is only 8%, which is bit more reasonable. Also remove $objects_limit from the message, because we already know that we are above (or close to) that limit. Telling the user about that number does not really give him any useful information. The following octave script shows the probability for at least m*q objects to be found in q subdirectories of .git/objects if n is the total number of objects. q = 4; m = [1 2 8]; n = 0:10:2000; P = zeros(length(n), length(m)); for k = 1:length(n) P(k, :) = 1-binocdf(q*m-1, n(k), q/(256-q)); end plot(n, P); n \ q 1 4 50 18% 1% 100 32% 8% 200 54% 39% 500 86% 96% Signed-off-by: Clemens Buchacher <drizzd@aon.at> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui/lib/branch_rename.tcl')
0 files changed, 0 insertions, 0 deletions