From owner-freebsd-stable@freebsd.org Fri Jan 8 10:47:43 2021 Return-Path: Delivered-To: freebsd-stable@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6C484C549D for ; Fri, 8 Jan 2021 10:47:43 +0000 (UTC) (envelope-from petefrench@ingresso.co.uk) Received: from constantine.ingresso.co.uk (constantine.ingresso.co.uk [31.24.6.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DC0DZ52wXz3R08 for ; Fri, 8 Jan 2021 10:47:42 +0000 (UTC) (envelope-from petefrench@ingresso.co.uk) Received: from [2001:470:6cc4:1:cd6:5836:ddba:7b54] (helo=balta.drayhouse.twisted.org.uk) by constantine.ingresso.co.uk with esmtpsa (TLS1.3) tls TLS_AES_128_GCM_SHA256 (Exim 4.94 (FreeBSD)) (envelope-from ) id 1kxpIt-000Csm-68 for freebsd-stable@freebsd.org; Fri, 08 Jan 2021 10:47:35 +0000 Subject: Re: How to handle the pack files now we have switched to git? To: freebsd-stable@freebsd.org References: <22d067ae-c204-0dc5-4195-2d1c07f35560@ingresso.co.uk> From: Pete French Message-ID: <2850cb71-6471-d672-25bc-eafb16c75954@ingresso.co.uk> Date: Fri, 8 Jan 2021 10:47:34 +0000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4DC0DZ52wXz3R08 X-Spamd-Bar: + Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=pass (policy=none) header.from=ingresso.co.uk; spf=pass (mx1.freebsd.org: domain of petefrench@ingresso.co.uk designates 31.24.6.74 as permitted sender) smtp.mailfrom=petefrench@ingresso.co.uk X-Spamd-Result: default: False [1.18 / 15.00]; RCVD_TLS_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[31.24.6.74:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:31.24.6.74]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[31.24.6.74:from:127.0.2.255]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_SPAM_SHORT(0.98)[0.975]; DMARC_POLICY_ALLOW(-0.50)[ingresso.co.uk,none]; NEURAL_SPAM_LONG(1.00)[1.000]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16082, ipnet:31.24.0.0/21, country:GB]; SUBJECT_ENDS_QUESTION(1.00)[]; MAILMAN_DEST(0.00)[freebsd-stable]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2021 10:47:43 -0000 On 06/01/2021 15:47, Ulrich Spörlein wrote: > That's not entirely correct. The packfile will only be rewritten if > a) enough other stuff has accumulated > b) you force a repack. > > You are fighting against git's GC mechanism a bit here, but you can > still make it work. On your source of truth host, do the following: > > 1. git gc --aggressive > 2. look at .git/objects/pack, there should be a single big pack > 3. touch .git/objects/pack/pack-.keep  (or was it > .pack.keep?) > 4. rsync --del to all other hosts > > Now future git gc runs will not delete that big pack, you'll only get > churn in the new, much smaller, packs. I missed seeing this until now, sorry, but thankyou! This is excellent, and looks like a much better solution - or at least one which lets me know 100% that I have percisely the same files on each machine. I will gve this a try next time I need to do an update. thanks, -pete.