All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Wong <e@80x24.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: [RFC] gc: correct gc.autoPackLimit documentation
Date: Sat, 25 Jun 2016 01:14:50 +0000	[thread overview]
Message-ID: <20160625011450.GA14293@dcvr.yhbt.net> (raw)

I'm not sure if this is the best approach, or if changing
too_many_packs can be done without causing problems for
hosts of big repos.

-------8<-----
Subject: [PATCH] gc: correct gc.autoPackLimit documentation

I want to ensure there is only one pack in my repo to take
advantage of pack bitmaps.  Based on my reading of the
documentation, I configured gc.autoPackLimit=1 which led to
"gc --auto" constantly trying to repack on every invocation.

Update the documentation to reflect what is probably a
long-standing off-by-one bug in builtin/gc.c::too_many_packs:

	-	return gc_auto_pack_limit <= cnt;
	+	return gc_auto_pack_limit < cnt;

However, changing gc itself at this time may cause problems
for people who are already using gc.autoPackLimit=2 and
expect bitmaps to work for them.

Signed-off-by: Eric Wong <e@80x24.org>
---
 Documentation/config.txt | 2 +-
 Documentation/git-gc.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/config.txt b/Documentation/config.txt
index 2e1b2e4..b0de3f1 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -1345,7 +1345,7 @@ gc.auto::
 	default value is 6700.  Setting this to 0 disables it.
 
 gc.autoPackLimit::
-	When there are more than this many packs that are not
+	When there at least this many packs that are not
 	marked with `*.keep` file in the repository, `git gc
 	--auto` consolidates them into one larger pack.  The
 	default	value is 50.  Setting this to 0 disables it.
diff --git a/Documentation/git-gc.txt b/Documentation/git-gc.txt
index fa15104..658612d 100644
--- a/Documentation/git-gc.txt
+++ b/Documentation/git-gc.txt
@@ -54,7 +54,7 @@ all loose objects are combined into a single pack using
 `git repack -d -l`.  Setting the value of `gc.auto` to 0
 disables automatic packing of loose objects.
 +
-If the number of packs exceeds the value of `gc.autoPackLimit`,
+If the number of packs matches or exceeds the value of `gc.autoPackLimit`,
 then existing packs (except those marked with a `.keep` file)
 are consolidated into a single pack by using the `-A` option of
 'git repack'. Setting `gc.autoPackLimit` to 0 disables
-- 
EW

             reply	other threads:[~2016-06-25  1:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-25  1:14 Eric Wong [this message]
2016-06-25  2:06 ` [RFC] gc: correct gc.autoPackLimit documentation Jeff King
2016-06-25  2:53   ` Eric Wong
2016-06-25  6:14     ` Junio C Hamano
2016-06-25  6:46       ` [PATCH] gc: fix off-by-one error with gc.autoPackLimit Eric Wong
2016-06-27 19:38         ` Jeff King

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=20160625011450.GA14293@dcvr.yhbt.net \
    --to=e@80x24.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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.