Thread (1 message) 1 message, 1 author, 2019-07-08

Re: [PATCH 2/1] repack: warn if bitmaps are explicitly enabled with keep files

From: Junio C Hamano <hidden>
Date: 2019-07-08 17:41:09

Jeff King [off-list ref] writes:
On Wed, Jul 03, 2019 at 11:10:22AM -0700, Junio C Hamano wrote:
quoted
quoted
Or perhaps we could differentiate our temporary locks from "real" .keep
files by looking at the content; I think our locks always say something
like "(receive|receive)-pack \d+ on .*", and it wouldn't be too onerous
to commit to that, I think (or even adjust it to something even more
unambiguous).
True, but it may be overkill to open and read.
Yeah, that cross my mind as well, but:

  1. We'd only need to open them when we _see_ them. And they're pretty
     rare anyway.

  2. Effort-wise, we're already opening and mmap-ing the .idx files, so
     this is on par.

  3. Most callers don't care about keep-files anyway. We could turn
     packed_git.pack_keep into:

       enum {
         PACK_KEEP_NONE,
         PACK_KEEP_LOCK,
	 PACK_KEEP_USER
       } check_packed_keep(struct packed_git *pack);

     and then most programs wouldn't pay anything.

Just some thoughts. I don't have immediate plans to work on it, but
maybe somebody else is excited about it. :)
OK.  I do agree that .keep would be rare enough to justify spending
a bit more extra cycles, as long as the benefit is big enough (and
in this case it may be a good trade-off).
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help