From patchwork Mon Mar 31 22:10:17 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: 41102 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 2A18827BBE9; Mon, 31 Mar 2025 23:13:04 +0100 (BST) 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 2721A27BBE2 for ; Mon, 31 Mar 2025 23:13:03 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tzNN6-0000QH-53; Mon, 31 Mar 2025 18:12:44 -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 1tzNMW-0000DF-Ot for guix-patches@gnu.org; Mon, 31 Mar 2025 18:12:11 -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 1tzNMW-0006zY-Eu; Mon, 31 Mar 2025 18:12: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=v6QSKnKzN4Vf5giyg0jQRMAZdjIyhW33GwUChKWva18=; b=fleFZFhE6YdvRSrWfEr+HITdZxyILX6uuIJ5Wkg7InahNU+lfn737QE/wOv16MrXrcppOgqRkCZoAmVoDtQrb8nu0v4rWrCT5OiIttlrGGDzdMbIVByXj7HNODKE/lNUEiOz+kvBJfV+arVn/crjbbaQef1UwCGnymkS6rhpndSvJay311uYnmauQIA4IDhTkmWtODNtC2QEvSJmd4rK5t2h7UqyoGkeEPiETzQSPuWTV94WjSUsUHrvAL1Ew97UwOKfHbBh7G6X+00815C7IRjLixLSzCooFyklkbOQvCJ74rhlS9SGZ9fdIHJKQDXTR4zjZp8PlZxB6+TzJG//1A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tzNMW-0000c0-7E; Mon, 31 Mar 2025 18:12:08 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77186] [PATCH v2 11/14] 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: Mon, 31 Mar 2025 22:12: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.17434590742011 (code B ref 77186); Mon, 31 Mar 2025 22:12:08 +0000 Received: (at 77186) by debbugs.gnu.org; 31 Mar 2025 22:11:14 +0000 Received: from localhost ([127.0.0.1]:43366 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tzNLd-0000WF-Ew for submit@debbugs.gnu.org; Mon, 31 Mar 2025 18:11:14 -0400 Received: from wolfsden.cz ([37.205.8.62]:41030) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <~@wolfsden.cz>) id 1tzNL7-0000Qu-CG for 77186@debbugs.gnu.org; Mon, 31 Mar 2025 18:10:44 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 5D976378EE1; Mon, 31 Mar 2025 22:10:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459040; bh=ajEwY7oFBemxxkb0brWc/OUaSmBJWi9P6i8uUiJ14lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=bylAzNYj+cEiIZjowz0uWbpQSi6xnP3aTYlDn1JS4vuuFGtjPG8E35RyyTngo0yiE L8kkGHAit+1iMGzk8wqw+dHJRmc712y+ecmo8igF3dYJZy3unDXXVuYyGNSvig1rhL OxdRDJuHoRafij8nJsOulvoeAATTU3MvN3VckDZtSfdaUIn0Q5RU+sayIteKCztrkp C3EDCiJKjRF7Cfqh2bztWOLX/GQDm7eyWt1TQTHXJpfE5s86hvJfCM8uTM8Nu8Ylzm J0u0f5wcNNMJIzRrMqg3JK2tnbPdzINygiJE8A6APDHEDE34vokmQhH0UI8s3DoQWR QpVJ2F9aGLlCk3z7XWPMhh2UKGjLNCNX4bRsfAF8bqE5MBjuIE8s+TRVt1I/PeeWwY S02lgGdJG3D9o/0fkbvB5ubTtcZrJK+jsHGXXsKFce8pQUvdMKL8l2GEHZ92sRt6OE 1rkQmO04945AiAkIcT+MO4xVb4R7L3dHrGljD0qoHAyU+74HKTpCmn/UkmNxFT/61L a64cA6HC6jLo6fhXo8WMyRs1CwisZw8zUBlDCb8IUTV6BJ/VhDvvDUnZ/61pJl420E kI61q5ZW1rAObJ4WNrm6rNVBhdpbn+EDU9MiP3mfbGCDezCIdQFjgMQYyd44fSB13T Yb68BsQJ5q/+vxh5H0ahLJVE= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 1445B3789FB; Mon, 31 Mar 2025 22:10:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1743459038; bh=ajEwY7oFBemxxkb0brWc/OUaSmBJWi9P6i8uUiJ14lE=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ugg+YPwQiyr/72eiW+h2m7J8dGLgZc7svMeSv56XgsIWmJSYJfv9GfxNXbIfnTKmP WhZ6yR6yOzsCCpQ046RpAi7H8m3tMs8lOiQcTJhVdVQaUCuU+FhbYlyALDwfZADlwW HLGT/pKwSLZam2R+DsdVIY+W853OEXfRTvNbKSSWhtHM1oLtq4rkQJ80U9Jrc1TusA 6MKvNN3NAJmA2E5q+4c/hQBkd1Z0ps8SO4jbK7aodEOtA63OeGCgBvckGLeVofkNzN BH7jFUlDOMoSZIOkxvlJ342uwaHK5QfyZLJfV7rk4QV7r33pbqqsFSrE8mKDsuurLc 3pDs3VqgPBLtkr1Anji5xIeEg1pO0w9Z3b41v76en6dhTrzXSXYS1xc28eaGtCV/47 v3u5GTfyCl09yhawm/31sEBORKmkb4J0e0IhN/2e+S4Qwxee3hMEk5JbNtSa4LUTKc AVdDRCWvI8Wcl7o4FLc2bojXLavqXsT6otU/UWzz0Wr6D0Q6q5gsmdoIcI6WABMKWD wW/BlhXA+WQqEOxHb/WDfWGZczz49+s3Re+TZFPCx6zW34Sy6YxWgT7B6+PJxrk3aT wrLaydWwY+IRY4OEzymfZL6hBg1y0qgFe5+KIOdBdmCgq87dz1RbXTAdNUyfyA0iJL mJ++zRAsMA4RsGgsJLe/ReFE= From: Tomas Volf <~@wolfsden.cz> Date: Tue, 1 Apr 2025 00:10:17 +0200 Message-ID: X-Mailer: git-send-email 2.49.0 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 f2f9827cc0..08a9c44e5b 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -41099,6 +41099,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