From patchwork Sat Mar 22 17:09:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomas Volf <~@wolfsden.cz> X-Patchwork-Id: 40648 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4F7CB27BBE9; Sat, 22 Mar 2025 17:12:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_ALL,DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL, RCVD_IN_VALIDITY_SAFE,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E42D627BBE2 for ; Sat, 22 Mar 2025 17:12:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2NP-0000cF-M7; Sat, 22 Mar 2025 13:11:15 -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 1tw2NI-0000ZM-TV for guix-patches@gnu.org; Sat, 22 Mar 2025 13:11:10 -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 1tw2NI-0007lU-It; Sat, 22 Mar 2025 13:11:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=kZHECjMn7n4qcLn/i+FC553o9xdX0OBpeUsjMQtJ7Dg=; b=kpuvy8nscYEl0gzhp2QbomMVhHR83JLi2ZK7fI64qIIJHU8ny0bGlkCByHrdbRQ32+UUwFg4hKuSijQfNf6GXFb31HVrqVolqSIg3ykGtvw1bStsq1/2D6nUTEZOTDOa131crA8Swx4+7gfXbN0aX6TIQ0rTQ85LJoIxCto1cUhNVZRB4sKrAXG+6CKbI/AD4LhYnqm30G09fsw28rMb5ctwMfpvw2ill0ZW9CDL3ZUnzAAyREGtNFAyQkI2CeMhKCHMxq0ONBq54jsrXBXiKGwp4DAC2fBQm/utBV0s2fSjj5MwNJiGe8/SsE3EJDWtpQAZOanonaxxKmrE2OHwIA==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2NI-0007JU-DW; Sat, 22 Mar 2025 13:11:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 11/13] services: gitolite-git-configuration: Add default-branch field. Resent-From: Tomas Volf <~@wolfsden.cz> Original-Sender: "Debbugs-submit" Resent-CC: ludo@gnu.org, maxim.cournoyer@gmail.com, guix-patches@gnu.org Resent-Date: Sat, 22 Mar 2025 17:11:08 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77186 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77186@debbugs.gnu.org Cc: Tomas Volf <~@wolfsden.cz>, Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer X-Debbugs-Original-Xcc: Ludovic =?utf-8?q?Court=C3=A8s?= , Maxim Cournoyer Received: via spool by 77186-submit@debbugs.gnu.org id=B77186.174266343827840 (code B ref 77186); Sat, 22 Mar 2025 17:11:08 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:10:38 +0000 Received: from localhost ([127.0.0.1]:45259 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Mm-0007EP-3e for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:37 -0400 Received: from wolfsden.cz ([37.205.8.62]:57596) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2MJ-00075n-E6 for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:10:09 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 6283837EA76; Sat, 22 Mar 2025 17:10:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663403; bh=BV+BrEyDw5lVblAZ/zMBfsNslphXhyB22RcUeRl+E2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WeEE8dzvEupOwJYXIPd/rLkg2qL9nP0BujRH/dUK2UIqOU7WK3IIgsbo/rlaWhpgr 2uCc0uRMxmEmK2/8F8LwJ63Pb0YBr0V9Pe+t+7kDruLEw2oPU9IeROd2JfQ8DS6dcH 4VGstfmCQYStcUP0h5th6H4Vd9n5xU5+npAJygRwsdEhg/PB5kAr9wjLr/53/7njWX DQrxfzXuh70/OvoO5A7cwoa3/jBgRIGyujOluuqMXzT8WqLSVgsYVRyjXL5dRNeoQR JyXlE9CCiGPAdsCXgXePFmYBWcxxo4vj/yEhqPFTgn2Ydlm355mGC31ZbKa0srKMDu g+DLrq3JAD18DB+7Ixu8crv2kLwgd/HJa2sHsL1X0fOD0ay46PzcQ0gvnXAJdFpfn7 mg4p3gtIrh9d51qTU7t6iPtw3mfuy45k+BGn4cd7g3MEAk4lrZKTllNMQ2DXN5WDqZ 9zrWwfwPqrhX7vQuiD5iYjisr0wdS8Rm4nGlZAJPuTmErazB5BKgEyiRSbbs5U6+3X UN/AgCBA/CkLe7g1MDDz46j6f50zZuVWP9pCWlyOZZBQjnXxoCErAPjwKMqeqnu5ey POy7MRC91G9UK4l/1Nt4iXcdSvqAESr3TmYn85d99y3dBr7pdRHETJZKdXz/BL8ukX cy1w7BvdiSPtjoXcZ19ROuaM= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id B253738078F; Sat, 22 Mar 2025 17:10:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742663402; bh=BV+BrEyDw5lVblAZ/zMBfsNslphXhyB22RcUeRl+E2Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=W/BT9v6MOdIQETx9zvhtGu4sLGMv9g6UrRsgODh72Y/bEvgW76SwLwpkIk7S/Y+/x twh/EE48zqvxJOgOILrVxqlJOi0dyrvs7FQEyI0oEcLFDdtD7p5jwOm2Bj3gsDVwub /57dzDcQRHm0SRZRWAkHqDa0y6MENN5lE/+tIin4xxCHTxy0/S/Ep/nRQSgJ4P9EA7 kz0NCtYbIZWLXr1jPTdWgdhdX09WucJaezMInE4trf85hth2FHxmD7BoJZSLs3EiIK DIO7xg0PyHKiuSQrggB4rkAnU8dtctLaiHJSYaFAtB7jFDFlTmquWFduNCCeOCwfuL rFccdwBON3C0Peu1PaTrBr6CMxL8KHd/qfIhHca0b7Qxm2+weDlZlP8izEGL/etqpU pn7sEp12ZR9ZDRlpOCOJmdUZAIeoo2Chf8txrffERFZ3/Gzmvjt8wwk6H1k4uNb2fv GBVoBdee4EEsJ+B3GyK4nffaTGNanYYFS20egdc0roeVl+wFNOEYUxAUMznL1hWKuc /mBL2akH6BI+9TwKzEkWyfy/kAZKrB9GeLt92r/iyGd8GlTAf2tkerknVY4yYpja+U cz+UXuNpUWnKjIEnubqgODSTNXDYLG9BZwjpGcfu8jsBcKDhA+dL6wA6qbpikVIMKh K/aay2UygcVwfhxW1zjsxyxI= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:09:12 +0100 Message-ID: <871ecd2df2e7632bf18134424874038074cb8065.1742663354.git.~@wolfsden.cz> X-Mailer: git-send-email 2.48.1 In-Reply-To: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> References: <39fb02cc97f30aa37523d9f5f9390264d53fcf8b.1742663354.git.~@wolfsden.cz> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/services/version-control.scm (): Add default-branch field. (gitolite-git-configuration-compiler): Handle it during configuration file generation. * doc/guix.texi (Version Control Services): Document it. Change-Id: Iceb02f60b8ef26138961aefef4e56ca83df0e19f --- doc/guix.texi | 4 ++++ gnu/services/version-control.scm | 19 +++++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index e584b072e1..3332813a02 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41185,6 +41185,10 @@ Version Control Services @item @code{email} (default: @code{"guix@@localhost"}) Email used for commits (e.g. during setting up the admin repository). +@item @code{default-branch} (default: @code{#f}) +If true, set the @code{init.defaultBranch} option to that value. Common +values are @code{"master"} and @code{"main"}. + @end table @end deftp diff --git a/gnu/services/version-control.scm b/gnu/services/version-control.scm index dcdddf8078..12653b3cea 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -72,6 +72,7 @@ (define-module (gnu services version-control) gitolite-git-configuration? gitolite-git-configuration-name gitolite-git-configuration-email + gitolite-git-configuration-default-branch gitolite-service-type @@ -330,19 +331,25 @@ (define-gexp-compiler (gitolite-rc-file-compiler (define-record-type* gitolite-git-configuration make-gitolite-git-configuration gitolite-git-configuration? - (name gitolite-git-configuration-name - (default "GNU Guix")) - (email gitolite-git-configuration-email - (default "guix@localhost"))) + (name gitolite-git-configuration-name + (default "GNU Guix")) + (email gitolite-git-configuration-email + (default "guix@localhost")) + (default-branch gitolite-git-configuration-default-branch + (default #f))) (define-gexp-compiler (gitolite-git-configuration-compiler (config ) system target) (match-record config - (name email) + (name email default-branch) (apply text-file* "gitconfig" `("[user]\n" "name = " ,name "\n" - "email = " ,email "\n")))) + "email = " ,email "\n" + ,@(if default-branch + `("[init]\n" + "defaultBranch = " ,default-branch "\n") + '()))))) (define-record-type* gitolite-configuration make-gitolite-configuration