diff mbox series

[v3,06/10] Documentation/config/pack.txt: advertise 'pack.writeReverseIndex'

Message ID 7e29f2d3a08c42b1e8368c4a2f52a11cc47ee959.1611617820.git.me@ttaylorr.com (mailing list archive)
State New, archived
Headers show
Series pack-revindex: introduce on-disk '.rev' format | expand

Commit Message

Taylor Blau Jan. 25, 2021, 11:37 p.m. UTC
Now that the pack.writeReverseIndex configuration is respected in both
'git index-pack' and 'git pack-objects' (and therefore, all of their
callers), we can safely advertise it for use in the git-config manual.

Signed-off-by: Taylor Blau <me@ttaylorr.com>
---
 Documentation/config/pack.txt | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Jeff King Jan. 29, 2021, 12:30 a.m. UTC | #1
On Mon, Jan 25, 2021 at 06:37:34PM -0500, Taylor Blau wrote:

> +pack.writeReverseIndex::
> +	When true, git will write a corresponding .rev file (see:
> +	link:../technical/pack-format.html[Documentation/technical/pack-format.txt])
> +	for each new packfile that it writes in all places except for
> +	linkgit:git-fast-import[1] and in the bulk checkin mechanism.
> +	Defaults to false.

We may want to teach fast-import about this, too, but I think it's OK to
draw the line here for now (it's already reasonably well known that the
generated packs aren't amazing and benefit from repacking).

-Peff
Taylor Blau Jan. 29, 2021, 1:17 a.m. UTC | #2
On Thu, Jan 28, 2021 at 07:30:56PM -0500, Jeff King wrote:
> On Mon, Jan 25, 2021 at 06:37:34PM -0500, Taylor Blau wrote:
>
> > +pack.writeReverseIndex::
> > +	When true, git will write a corresponding .rev file (see:
> > +	link:../technical/pack-format.html[Documentation/technical/pack-format.txt])
> > +	for each new packfile that it writes in all places except for
> > +	linkgit:git-fast-import[1] and in the bulk checkin mechanism.
> > +	Defaults to false.
>
> We may want to teach fast-import about this, too, but I think it's OK to
> draw the line here for now (it's already reasonably well known that the
> generated packs aren't amazing and benefit from repacking).

Maybe this was worth explaining in the documentation, but this choice
was intentional. I'm not aware of any use-case that keeps the packs
generated by fast-import around for very long (i.e., I'd expect any 'git
fast-import' to be pretty quickly followed by a 'git repack -ad'), so I
don't think we'd want to spend time generating a reverse index for a
pack structure that we're about to immediately discard.

> -Peff

Thanks,
Taylor
Jeff King Jan. 30, 2021, 8:41 a.m. UTC | #3
On Thu, Jan 28, 2021 at 08:17:40PM -0500, Taylor Blau wrote:

> On Thu, Jan 28, 2021 at 07:30:56PM -0500, Jeff King wrote:
> > On Mon, Jan 25, 2021 at 06:37:34PM -0500, Taylor Blau wrote:
> >
> > > +pack.writeReverseIndex::
> > > +	When true, git will write a corresponding .rev file (see:
> > > +	link:../technical/pack-format.html[Documentation/technical/pack-format.txt])
> > > +	for each new packfile that it writes in all places except for
> > > +	linkgit:git-fast-import[1] and in the bulk checkin mechanism.
> > > +	Defaults to false.
> >
> > We may want to teach fast-import about this, too, but I think it's OK to
> > draw the line here for now (it's already reasonably well known that the
> > generated packs aren't amazing and benefit from repacking).
> 
> Maybe this was worth explaining in the documentation, but this choice
> was intentional. I'm not aware of any use-case that keeps the packs
> generated by fast-import around for very long (i.e., I'd expect any 'git
> fast-import' to be pretty quickly followed by a 'git repack -ad'), so I
> don't think we'd want to spend time generating a reverse index for a
> pack structure that we're about to immediately discard.

One case where I imagine they are kept is in remote-helpers that use the
import/export mechanism (e.g., something interacting with remote-hg). I
suspect people there just live with the somewhat lousy packs, and then
perhaps occasionally "git repack -adf". That would give them .rev files
then, too.

But as I said, I think it's OK to ignore this for now. If somebody with
an interest in fast-import wants to add support later, they can.

-Peff
diff mbox series

Patch

diff --git a/Documentation/config/pack.txt b/Documentation/config/pack.txt
index 837f1b1679..3da4ea98e2 100644
--- a/Documentation/config/pack.txt
+++ b/Documentation/config/pack.txt
@@ -133,3 +133,10 @@  pack.writeBitmapHashCache::
 	between an older, bitmapped pack and objects that have been
 	pushed since the last gc). The downside is that it consumes 4
 	bytes per object of disk space. Defaults to true.
+
+pack.writeReverseIndex::
+	When true, git will write a corresponding .rev file (see:
+	link:../technical/pack-format.html[Documentation/technical/pack-format.txt])
+	for each new packfile that it writes in all places except for
+	linkgit:git-fast-import[1] and in the bulk checkin mechanism.
+	Defaults to false.