From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.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 sAw0N2ab+WWpFAAAe85BDQ:P1 (envelope-from ) for ; Tue, 19 Mar 2024 15:04:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id sAw0N2ab+WWpFAAAe85BDQ (envelope-from ) for ; Tue, 19 Mar 2024 15:04:23 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=sdQWMVZD; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1710857062; 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: content-transfer-encoding:content-transfer-encoding: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:dkim-signature; bh=G59/4ha7Dh2Id1eJ8FUszRK46dVtLzIIdj0xSHX/ius=; b=rIytBOokhtPeSRw2nKYu2fEskzdoHMdfX6yj4v210HHb7+WX/QWTta5WAhRvPDdBRQJBUX yzeDHr6zOwouXKASRyFC+xRoQY4ngkkeMRq2cP1nS1yebgYcdYh94JVsS9Kjyq+btNDDzR XbJjyBdVp679XbuWnzomp5deaLM72p5BPnJ3vPU66KoMlZkaUOa1UEn+Y7xfLnQkG7MiTB fqgEnkb5gHGX1E3brZMrvXVFsCgMXEenex8S39MA8O2gMDNQAlwbku4DetPuxi46Ny3lk3 PHSXvURorsK0/lzio3mdebrT81EZV79tjp+cTVmuytt5MKDKa+SCzxluKJuzwg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=sdQWMVZD; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Seal: i=1; s=key1; d=yhetil.org; t=1710857062; a=rsa-sha256; cv=none; b=SVzAEdWMoMPAtwFb+lwiTOtPeMvjh6h2QcRGz2ukewz4gUpPvLapmUfAHaOTm32WawFcV+ Z6W3rqkSfYHnORXWjT+yYRGjcXUnMJJjQv5M+nHtHe+rty41kMhv6D06kD+9FH+fxx/Qnz sPQNWdQvTs+ErYsIayqabJXMpsPmzt3wxabm7prsbJEd0aT6n/fiwtfAoIB6NOJwjvxWoD Jo8Bj1TGtsE6diHU8ldBNesCByi8NBO0E1r14z2rgY1diSoNnT5mlbw7ryj0fa0eLTzccC Fa4owxJmh/B4bAA1z/hvkrg9gAzDOU1YVRoQde+4FR5UPxg6XgLtOnG6HSTeTA== 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 C65F562C2D for ; Tue, 19 Mar 2024 15:04:22 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rma3q-0002V3-Ik; Tue, 19 Mar 2024 10:03:26 -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 ) id 1rma3o-0002Tl-9c for guix-patches@gnu.org; Tue, 19 Mar 2024 10:03:24 -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 ) id 1rma3o-0007X6-0r for guix-patches@gnu.org; Tue, 19 Mar 2024 10:03:24 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rma4Q-00036c-Cl for guix-patches@gnu.org; Tue, 19 Mar 2024 10:04:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#69780] [PATCH 3/4] git authenticate: Install pre-push and post-checkout hooks. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 19 Mar 2024 14:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69780 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tomas Volf <~@wolfsden.cz> Cc: 69780@debbugs.gnu.org Received: via spool by 69780-submit@debbugs.gnu.org id=B69780.171085700111768 (code B ref 69780); Tue, 19 Mar 2024 14:04:02 +0000 Received: (at 69780) by debbugs.gnu.org; 19 Mar 2024 14:03:21 +0000 Received: from localhost ([127.0.0.1]:50914 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rma3k-00033k-UM for submit@debbugs.gnu.org; Tue, 19 Mar 2024 10:03:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:55072) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rma3f-00032W-52 for 69780@debbugs.gnu.org; Tue, 19 Mar 2024 10:03:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rma2v-0007KK-Nx; Tue, 19 Mar 2024 10:02:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=G59/4ha7Dh2Id1eJ8FUszRK46dVtLzIIdj0xSHX/ius=; b=sdQWMVZDa+ZjSvb48eQq PcwoeBvdRxxsuDOk7QrLjr4PWwabERpWRpRKq0vCptx+ngDB9PHiul4illrV2QbxjsfdRCoFqIS2E J5WyzTozT5n7QiwTA63KTCda+UBYNkne3Jlt5rqSbqogmGlQlpq5wPJTte45Dha1EWC8oUFRwlbrM kVmTN7nGSl34Y2DxEU1oWmMgHcM6J+D8vCVfYsyZpQ9bMQDFAWosU/NbqLiIwoVkyYTBBQ0DX75Gp wu1udOI00u1ghhMIOj4i0TghqirSHCL0MNJ7WuufiSL8k7aQrkYbwtl92z7JmVemuewcF8o7r2Q9l PKVHcIw0jfQtRA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: (Tomas Volf's message of "Sat, 16 Mar 2024 22:09:20 +0100") References: <6a556beb2566aa401d5064049e136ff2a7669b63.1710351278.git.ludo@gnu.org> Date: Tue, 19 Mar 2024 15:02:11 +0100 Message-ID: <87h6h248ws.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -7.21 X-Spam-Score: -7.21 X-Migadu-Queue-Id: C65F562C2D X-Migadu-Scanner: mx13.migadu.com X-TUID: 1pRvVU09CuQT Tomas Volf <~@wolfsden.cz> skribis: > On 2024-03-13 18:42:21 +0100, Ludovic Court=C3=A8s wrote: >> * guix/scripts/git/authenticate.scm (install-hooks): New procedure. >> (guix-git-authenticate): Use it. >> * doc/guix.texi (Invoking guix git authenticate): Document it. >> >> Change-Id: I4464a33193186e85b476a12740e54412bd58429c [...] >> + (define directory >> + (repository-directory repository)) >> + >> + (define pre-push-hook >> + (in-vicinity directory "hooks/pre-push")) >> + >> + (define post-checkout-hook >> + (in-vicinity directory "hooks/post-checkout")) > > I think these will not work with worktrees. Right. I=E2=80=99m not sure Guile-Git can help here. >> +while read local_ref local_oid remote_ref remote_oid >> +do >> + guix git authenticate --end=3D\"$local_ref\" > > Am I right in believing that the --end does solve #69541? Shame it (--en= d) is > not documented in the --help. Indeed, I=E2=80=99ll add it. >> +done\n") >> + (chmod port #o755))) > > What is role of etc/git/pre-push now? Should it be removed? Should it be > updated to run this code instead? We could discuss it, but this is orthogonal. The changes here are meant for broad usage of =E2=80=98guix git authenticate=E2=80=99, not (or not jus= t) within Guix. Ludo=E2=80=99.