Subject: Re: [PATCH] docs/git-pack-refs: document heuristic used for packing loose refs

From: Patrick Steinhardt <[email-masked]>
Date: Tue, 8 Jul 2025 13:48:01 +0200

On Tue, Jul 08, 2025 at 04:43:42AM -0700, Karthik Nayak wrote:
> Patrick Steinhardt <[email-masked]> writes:
> > diff --git a/Documentation/git-pack-refs.adoc b/Documentation/git-pack-refs.adoc
> > index 652c5497715..42b90051e69 100644
> > --- a/Documentation/git-pack-refs.adoc
> > +++ b/Documentation/git-pack-refs.adoc
> > @@ -66,7 +66,10 @@ Pack refs as needed depending on the current state of the ref database. The
> >  behavior depends on the ref format used by the repository and may change in the
> >  future.
> >  +
> > -	- "files": No special handling for `--auto` has been implemented.
> > +	- "files": Loose references are packed into the `packed-refs` file
> > +	  based on the ratio of loose references to the size of the
> > +	  `packed-refs` file. The bigger the `packed-refs` file, the more loose
> > +	  references need to exist before we repack.
> >  +
> 
> Nice. The explanation has sufficient information without going too much
> into detail. Perhaps a small nit would be s/ratio/logarithmic ratio/,
> but I'm happy with this as is.

I was very much on the fence on whether to add "logarithmic" in there or
not. I ultimately felt like it hinted too much at how exactly it works
without really giving enough information to fully understand it, so it
felt a bit useless to me to add "logarithmic".

I don't have a strong opinion though, and it doesn't seem like you feel
strongly about it, either. So for now I'll keep this as-is, but I'm
happy to change it if others also have a slight preference for adding
the word in.

Thanks!

Patrick