From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bug-guix-bounces+larch=yhetil.org@gnu.org>
Received: from mp11.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms8.migadu.com with LMTPS
	id wNFXEe+bP2XfJAAA9RJhRA:P1
	(envelope-from <bug-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 30 Oct 2023 13:05:03 +0100
Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp11.migadu.com with LMTPS
	id wNFXEe+bP2XfJAAA9RJhRA
	(envelope-from <bug-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Mon, 30 Oct 2023 13:05:03 +0100
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id 239C140E4A
	for <larch@yhetil.org>; Mon, 30 Oct 2023 13:05:03 +0100 (CET)
Authentication-Results: aspmx1.migadu.com;
	dkim=none;
	spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org";
	dmarc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1698667503;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:resent-cc:resent-from:resent-sender:
	 resent-message-id:in-reply-to:in-reply-to:references:references:
	 list-id:list-help:list-unsubscribe:list-subscribe:list-post;
	bh=ABQAlxAUEiyj4HfjejoDRAzQMT7l8bgKhTFaTIpGuPU=;
	b=dQGm2Aljl4cJx0mMo6x6g8m8Zbyc5H4K6MimzFuAkr1kaigDYMs/BL3P5TdOLIdVpx1Cpx
	zmNg2l3szT9/z7GjU2FcLViKXYAZR0INH6oaqiX9/T9cWrxO0yOnmkyBMmZyVH7KeleBZ0
	QQtW+XwbMOLQ/eoQzRivCfMmDIhZL75Nhlwibwg7ihofCqgKQMI4tCYHeJlWCzu4D39HPZ
	P+28qwP5gS4jcWxzxuQG8qe3k+dylG7+RWjXDCq9eCBMiH/5PbhkD5Dmz6ystM3vL/2rZQ
	EOTMDnNteB263mGs2J3zkNQsKMvdQY6EfAypGCMcQGaLScy7sH4K6PLJsxQBNQ==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=none;
	spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org";
	dmarc=none
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698667503; a=rsa-sha256; cv=none;
	b=QMwfB4cGR/U8pTcjH6wXvMY7JOAMqY0oTI3Y9Zef8kGUhaRK4wSbzALgmk60fLCck+o5eU
	YdQLu1L7wzsQbGnz65HLUJBj8S7+C60S1PEqOpw5d7iC8NTFiT+NSHv7YVp9YCWSVKo62Q
	AtLgWPX6bbEYzByPBiZOHkCd/2RUmXkEj/pOh33WPqVvJzgUvv/GxpPgon7RQdd4KOjy74
	5apdEcke03UsfnaXn7jjt8hcjFalmUe/FAybMBfrbaGRppnczgO2FqrM4Ra50xuxe6KJa9
	2BO0LefnI746q/ulxNRizVMhUMSZL4sNQS0dRFHTPG6M8lFatzuzM8QY6mrEwQ==
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-guix-bounces@gnu.org>)
	id 1qxR0R-0001xx-7k; Mon, 30 Oct 2023 08:04:31 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1qxR0P-0001wn-GI
 for bug-guix@gnu.org; Mon, 30 Oct 2023 08:04:29 -0400
Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1qxR0P-0002cv-7U
 for bug-guix@gnu.org; Mon, 30 Oct 2023 08:04:29 -0400
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1qxR0w-00085v-3f
 for bug-guix@gnu.org; Mon, 30 Oct 2023 08:05:02 -0400
X-Loop: help-debbugs@gnu.org
Subject: bug#65720: [bug#66650] [PATCH] git: Shell out to
 =?UTF-8?Q?=E2=80=98git_?= =?UTF-8?Q?gc=E2=80=99?= when necessary.
Resent-From: Christopher Baines <mail@cbaines.net>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-guix@gnu.org
Resent-Date: Mon, 30 Oct 2023 12:05:02 +0000
Resent-Message-ID: <handler.65720.B65720.169866749931097@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 65720
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludo@gnu.org>
Cc: 65720@debbugs.gnu.org, 66650@debbugs.gnu.org
Received: via spool by 65720-submit@debbugs.gnu.org id=B65720.169866749931097
 (code B ref 65720); Mon, 30 Oct 2023 12:05:02 +0000
Received: (at 65720) by debbugs.gnu.org; 30 Oct 2023 12:04:59 +0000
Received: from localhost ([127.0.0.1]:44440 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1qxR0s-00085U-RF
 for submit@debbugs.gnu.org; Mon, 30 Oct 2023 08:04:59 -0400
Received: from mira.cbaines.net ([212.71.252.8]:42990)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <mail@cbaines.net>)
 id 1qxR0p-00085H-Nd; Mon, 30 Oct 2023 08:04:56 -0400
Received: from localhost (pd95b13b0.dip0.t-ipconnect.de [217.91.19.176])
 by mira.cbaines.net (Postfix) with ESMTPSA id 5E33E27BBE2;
 Mon, 30 Oct 2023 12:04:21 +0000 (GMT)
Received: from felis (localhost [127.0.0.1])
 by localhost (OpenSMTPD) with ESMTP id 955346f3;
 Mon, 30 Oct 2023 12:04:18 +0000 (UTC)
References: <87jzswsrlt.fsf@gnu.org>
 <f588bb38b4b9fdaff29dd8af8c62aa3c55902f7c.1697818202.git.ludo@gnu.org>
User-agent: mu4e 1.10.5; emacs 28.2
From: Christopher Baines <mail@cbaines.net>
Date: Mon, 30 Oct 2023 12:02:59 +0000
In-reply-to: <f588bb38b4b9fdaff29dd8af8c62aa3c55902f7c.1697818202.git.ludo@gnu.org>
Message-ID: <87sf5swc3j.fsf@cbaines.net>
MIME-Version: 1.0
Content-Type: multipart/signed; boundary="=-=-=";
 micalg=pgp-sha512; protocol="application/pgp-signature"
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-guix@gnu.org
List-Id: Bug reports for GNU Guix <bug-guix.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-guix>,
 <mailto:bug-guix-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-guix>
List-Post: <mailto:bug-guix@gnu.org>
List-Help: <mailto:bug-guix-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-guix>,
 <mailto:bug-guix-request@gnu.org?subject=subscribe>
Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org
Sender: bug-guix-bounces+larch=yhetil.org@gnu.org
X-Migadu-Flow: FLOW_IN
X-Migadu-Country: US
X-Migadu-Spam-Score: -8.20
X-Spam-Score: -8.20
X-Migadu-Queue-Id: 239C140E4A
X-Migadu-Scanner: mx13.migadu.com
X-TUID: udv49bSra1fC

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


Ludovic Court=C3=A8s <ludo@gnu.org> writes:

> Fixes <https://issues.guix.gnu.org/65720>.
>
> This fixes a bug whereby libgit2-managed checkouts would keep growing as
> we fetch.
>
> * guix/git.scm (packs-in-git-repository, maybe-run-git-gc): New
> procedures.
> (update-cached-checkout): Use it.
> ---
>  guix/git.scm | 39 ++++++++++++++++++++++++++++++++++++---
>  1 file changed, 36 insertions(+), 3 deletions(-)
>
> Hi!
>
> This is a radical fix/workaround for the unbounded Git checkout growth
> problem, shelling out to =E2=80=98git gc=E2=80=99 when it=E2=80=99s likel=
y needed (=E2=80=9Ctoo many=E2=80=9D
> pack files around).
>
> I thought we might be able to implement a =E2=80=98git gc=E2=80=99 approx=
imation using
> the libgit2 =E2=80=9Cpackbuilder=E2=80=9D interface, but I haven=E2=80=99=
t got around to doing
> it: <https://libgit2.org/libgit2/#HEAD/search/pack>.
>
> Once again, shelling out is not my favorite option, but it=E2=80=99s a bu=
g we
> should fix sooner rather than later, hence this compromise.
>
> Thoughts?

This sounds good to me, the data service has this problem as well of
cached checkouts that grow to be too large and this sounds like it'll
address it.

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAmU/m8BfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF
ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh
aW5lcy5uZXQACgkQXiijOwuE9Xcx2A//f3qqeG4+4J5uvVPcP/26SMtpzvNCUsRs
5hzUgJherxg4U25tlUdXlpjSVTNDSc0qN7RpUQWy6rca/S/ro2NL/KcR7VAdyumu
v39ldNwbq0W2YC/eZ9fxS7SzeCnWV2oOpO5X5sy69TGvjE/plWNStttvOF/HFy6Y
CtH9GNXZE9xwL5PbRK1Lxun5JmamP3Lxk+oivN3ZC7AnhoYxGxJ4xHD9HfN970b/
6kBbc0Vcf0wHtHRVIEuhBw01JkklchBhTTzbYoi3SUFZeovbkm4Ys5g3s7nDVVZD
5XNMkdp2YcgdUtsfZN1jhgFXTsa6XyfFnQS/1qMfPg3U1niAj0nKIqjEfmUNnGD1
PpQbQ5WvOZm5S70HHDG9Cg58BVIcH0hrHqfVYyghhttf2yUvdKp6CtqNyuBzsr7D
276K8EAeTMcfQwtArxKaFfFG/ggInMvPy1UA1FoN2j0EIIxeND/7vcejqqIssjZm
jsU716+s9bP1JCf0s/gJPWSw7Iph7gOs4CKFUdQSeEqNawyXyetxc5PjI6K7NKzq
QSa7SJlTe0Lv8maRIZ7LV8t08n3PPFO0sFC7MQMVTCFbkwqFwaVGGdeFiF8dYXfN
m4eigk0nl9Poq7gQ79r0igy/rfkZW8mVKRucqVdUJ/znykJfiyBbadSmPcCZP6MS
XzvO0Cgwki8=
=sesm
-----END PGP SIGNATURE-----
--=-=-=--