From patchwork Sat Mar 22 17:00:31 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: 40630 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 17D1F27BBE9; Sat, 22 Mar 2025 17:03:45 +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 2E5C727BBE2 for ; Sat, 22 Mar 2025 17:03:43 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tw2Fr-0006p6-Tb; Sat, 22 Mar 2025 13:03:29 -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 1tw2EY-0006Ke-P6 for guix-patches@gnu.org; Sat, 22 Mar 2025 13:02:07 -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 1tw2EY-0005E8-Eo; Sat, 22 Mar 2025 13:02:06 -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=TiiMVVt6WB26Ky77PkS2Sy8GN8Shvzr39Rep1EuGDug=; b=rjsQ7LewXTyo6H3aCu886YBvXsgjN15nV9H6dlQ9ID0Iob6EQxYjGdfwuVK+5G2gQVm3m0qkDJkBxKC2lp5SHECcBeuHMdYedYdG3p3VN1sh8Uu7ONfCQTZcxGUiezfqrHb5mt5d1OU20hn4v/3HdS4ABnH3zUCg70weipNEpqxTbD3WRQrYEwIlv1jyT2oTXNoHijytjv07CzVT/x5PeTIxrAE48rN2cMcF8Q+EtmLZYhyXjMhnbVgV96E1ivKwJDUqxSKBVWWFAQL5N6nssWpbvNKJy78omLXBECUQmlHglHydWk6eGL1KLkREC1WBVx5DIHaIpvoNi7QQG041IQ==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tw2EY-0006hl-7f; Sat, 22 Mar 2025 13:02:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH 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:02:06 +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.174266288525625 (code B ref 77186); Sat, 22 Mar 2025 17:02:06 +0000 Received: (at 77186) by debbugs.gnu.org; 22 Mar 2025 17:01:25 +0000 Received: from localhost ([127.0.0.1]:45110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tw2Ds-0006fA-Rd for submit@debbugs.gnu.org; Sat, 22 Mar 2025 13:01:25 -0400 Received: from wolfsden.cz ([37.205.8.62]:58366) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tw2DF-0006bX-LJ for 77186@debbugs.gnu.org; Sat, 22 Mar 2025 13:00:47 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 9B7F3380461; Sat, 22 Mar 2025 17:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662844; bh=Jyz1bp39PgWoe4PDajzmP6HO2GwDyT4yEThG3v8q/Hk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ig3iis1j3kHYOH54apdVSL1CfRDDk65UHWtsNFH0qFje30M0OIjMSV9fKsCA0C90V BDNhBAbrB0QX3KsnLSky9TErsHM09X9/1/1gpLaOpOA3vcc3isTXJe5hmtmYHD6yBN xwgVijnktY70AhO9DCnbxSK8Y9rZutPO8+Eyi5VgN1wB/x6zYoW5szc2PgfoHobSb/ UmksjGSnB0OrMVHWAtki+Dz7f8Bwvh9EGs3og32dn29idd/QjOVtVxHHj82bj1oh/A oZO9w7WJsnhyHbW5UQcA4eNcbqRPGF2G65jZr+67CkxT8x3cat+amnJpveDB2e6hfu ltYQ8OJdXPlSkfR2aENfNic6Q/69aDdxXaVIGlSt9Z42dvXFCQKxvU+Z0UKMNoHPfb TW79I4N32SPtJmHqTXcqHXKldAnBgb0s0AVojYOJC0iGaCdr9kbD1IYIdi7URDT+vc erL8tLmG7AhFElxjaZdBCwh1jAHDf97gjs98sn3MOQiSH2zNMRlfQmc/eGUOhCyKSv ZVxbTidNDgRRDwNWtpAVIGJs2la7OSs66kC2CcSg/U30CXlHeL1i9P9lLsmh1SjqDt ASW9UNRBcnE67xIcmFmvcgVcVJPL8BozibeMOjTrfK0PXdBiBs7rMND5Y22DkQHZXb 5rfgWGTHXge5oVAZw3T7Rd60= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1C32D380C83; Sat, 22 Mar 2025 17:00:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1742662844; bh=Jyz1bp39PgWoe4PDajzmP6HO2GwDyT4yEThG3v8q/Hk=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ig3iis1j3kHYOH54apdVSL1CfRDDk65UHWtsNFH0qFje30M0OIjMSV9fKsCA0C90V BDNhBAbrB0QX3KsnLSky9TErsHM09X9/1/1gpLaOpOA3vcc3isTXJe5hmtmYHD6yBN xwgVijnktY70AhO9DCnbxSK8Y9rZutPO8+Eyi5VgN1wB/x6zYoW5szc2PgfoHobSb/ UmksjGSnB0OrMVHWAtki+Dz7f8Bwvh9EGs3og32dn29idd/QjOVtVxHHj82bj1oh/A oZO9w7WJsnhyHbW5UQcA4eNcbqRPGF2G65jZr+67CkxT8x3cat+amnJpveDB2e6hfu ltYQ8OJdXPlSkfR2aENfNic6Q/69aDdxXaVIGlSt9Z42dvXFCQKxvU+Z0UKMNoHPfb TW79I4N32SPtJmHqTXcqHXKldAnBgb0s0AVojYOJC0iGaCdr9kbD1IYIdi7URDT+vc erL8tLmG7AhFElxjaZdBCwh1jAHDf97gjs98sn3MOQiSH2zNMRlfQmc/eGUOhCyKSv ZVxbTidNDgRRDwNWtpAVIGJs2la7OSs66kC2CcSg/U30CXlHeL1i9P9lLsmh1SjqDt ASW9UNRBcnE67xIcmFmvcgVcVJPL8BozibeMOjTrfK0PXdBiBs7rMND5Y22DkQHZXb 5rfgWGTHXge5oVAZw3T7Rd60= From: Tomas Volf <~@wolfsden.cz> Date: Sat, 22 Mar 2025 18:00:31 +0100 Message-ID: X-Mailer: git-send-email 2.48.1 In-Reply-To: References: 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 68297dee19..712f0b1756 100644 --- a/gnu/services/version-control.scm +++ b/gnu/services/version-control.scm @@ -71,6 +71,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 @@ -329,19 +330,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