From patchwork Sat Sep 23 19:43:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Liliana Marie Prikler X-Patchwork-Id: 54279 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 E96E027BBEA; Mon, 25 Sep 2023 17:57:20 +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=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham 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 ED32C27BBE2 for ; Mon, 25 Sep 2023 17:57:19 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qkotB-0004aZ-HX; Mon, 25 Sep 2023 12:56:53 -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 1qkot8-0004aD-CC for guix-patches@gnu.org; Mon, 25 Sep 2023 12:56:51 -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 1qkot8-0007tc-3t for guix-patches@gnu.org; Mon, 25 Sep 2023 12:56:50 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qkotK-0001dx-Hs for guix-patches@gnu.org; Mon, 25 Sep 2023 12:57:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66171] [PATCH v2] gnu: git: Install shell completions. References: In-Reply-To: Resent-From: Liliana Marie Prikler Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 25 Sep 2023 16:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66171 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 66171@debbugs.gnu.org Cc: Simon Tournier Received: via spool by 66171-submit@debbugs.gnu.org id=B66171.16956610016279 (code B ref 66171); Mon, 25 Sep 2023 16:57:02 +0000 Received: (at 66171) by debbugs.gnu.org; 25 Sep 2023 16:56:41 +0000 Received: from localhost ([127.0.0.1]:46528 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkosu-0001d8-9I for submit@debbugs.gnu.org; Mon, 25 Sep 2023 12:56:41 -0400 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]:58570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qkosp-0001cq-Ae for 66171@debbugs.gnu.org; Mon, 25 Sep 2023 12:56:35 -0400 Received: by mail-ed1-x541.google.com with SMTP id 4fb4d7f45d1cf-533edb5ac54so3630710a12.0 for <66171@debbugs.gnu.org>; Mon, 25 Sep 2023 09:56:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695660973; x=1696265773; darn=debbugs.gnu.org; h=cc:to:content-transfer-encoding:mime-version:subject:date:from :message-id:from:to:cc:subject:date:message-id:reply-to; bh=FIrqiEEIrQ9gQhPuCpk+k8U176yVyvv+AoXOwh8uuiI=; b=d+swICkV+I11+EOYywgfkeW9fYUWLeuivMOxG6rtylQ5R452ws9Ip0llyMnfkwtHCo pC6yjhw/tLkl4tIvniN1LeTPd6hPt6HTEwSl8dKXRxyq4aUFwb8aLphrJMRC9Rhzqdhh eBcmt52e14aC8UuqyaNjziPP4HRUPwruVW0mmpIiwDM5jRNN0ywjEnGWew+EeHGidNyC gwa8jGKZ+RE4Kt9un+Yf4QjkztZrVOvp9E1MfyUx5wJfxT+T6XM4592sQKbh2pZvYNYl 2swmJk0iOoCwW9oNpPdAwAGLRgoh4dceRvljOLImhOVOD9chAjTKMtpz3gqX4t9YS6Vt bD6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695660973; x=1696265773; h=cc:to:content-transfer-encoding:mime-version:subject:date:from :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=FIrqiEEIrQ9gQhPuCpk+k8U176yVyvv+AoXOwh8uuiI=; b=GQBirLncXjMDdXJH7RlFmu+JvkTkXSs2UPeaH4sru6c3eo1y4fa4Cl0pGG5asjeGqE VwmNwvdxuzp4yBaJMK+qKbj2HnIGajvdbfnNFH9+UF8SxvBEi5MRHaFh0HODng5WfTmK dgRMk4X8JS7UN0lKVuUVgpZmjXL1WZeZ2LSmzZx9ZKQGFbUSvYoQJIYAjku4VY2SzE34 oXjJdhdcmD/UO7H+ADIn7oD+CoZKEXvo+iChrKNaSdTKd5tZ0EFKrNeV1umPW7tRz4Ye IAvCBraRHbMkIPAm5gfQhjhD7VFh5T4Ek6YSAu+UCD8fxJdjjp3KaysWwSMpnZbyVwDY z73A== X-Gm-Message-State: AOJu0YzY0EkQWj1sTBHKsg8ubs67B08o00e/GV7x60E52wzupAx1nDb9 A0IA+5bsY6pJSJUQKF9mLOO56Io3e1rHog== X-Google-Smtp-Source: AGHT+IGClI58ouozqF09RpvRKhMYPgpFa5x4XI6N51Lso/u++MyxMLjXy1A/16+XyteP7pXGAkmPkQ== X-Received: by 2002:a17:906:cc0c:b0:9ae:6919:813 with SMTP id ml12-20020a170906cc0c00b009ae69190813mr6153039ejb.17.1695660972814; Mon, 25 Sep 2023 09:56:12 -0700 (PDT) Received: from lumine.fritz.box (85-127-52-93.dsl.dynamic.surfer.at. [85.127.52.93]) by smtp.gmail.com with ESMTPSA id ox12-20020a170907100c00b00988f168811bsm6576593ejb.135.2023.09.25.09.56.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 09:56:11 -0700 (PDT) Message-ID: <7be0975a4d30362dec08c3115e68c992e58ab549.1695660890.git.liliana.prikler@gmail.com> From: Liliana Marie Prikler Date: Sat, 23 Sep 2023 21:43:07 +0200 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/packages/version-control.scm (git)[outputs]: Add “completion”. [#:phases]: Add ‘install-completion’. (git-minimal)[#:phases]: Adjust accordingly. --- Am Montag, dem 25.09.2023 um 13:12 +0200 schrieb Simon Tournier: > Naive question: this also adds “completion” to git-minimal, no? I mean, > does the phase need to be deleted in git-minimal? Indeed it does; updated the patch accordingly. Cheers gnu/packages/version-control.scm | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) base-commit: e134686cead6db62ea8b941b2ed7c0bd660804da diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 9716a6f27a..35d17d434e 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -303,6 +303,7 @@ (define-public git "credential-netrc" ; git-credential-netrc "credential-libsecret" ; git-credential-libsecret "subtree" ; git-subtree + "completion" ; git-completion and git-prompt "gui")) ; gitk, git gui (arguments `(#:make-flags `("V=1" ;more verbose compilation @@ -482,6 +483,20 @@ (define-public git (string-append subtree "/bin")) (install-file "contrib/subtree/git-subtree.1" (string-append subtree "/share/man/man1"))))) + (add-after 'install 'install-completion + (lambda* (#:key outputs #:allow-other-keys) + (let ((completion (assoc-ref outputs "completion"))) + (define (install-as file storename) + (let ((storename (string-append completion storename))) + (mkdir-p (dirname storename)) + (copy-file file storename))) + (with-directory-excursion "contrib/completion" + (for-each (cut apply install-as <>) + `(("git-prompt.sh" "/bin/git-prompt") + ("git-completion.bash" + "/share/bash-completion/completions/_git") + ("git-completion.zsh" + "/share/zsh/site-functions/_git"))))))) (add-after 'install 'restore-sample-hooks-shebang (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -639,6 +654,7 @@ (define-public git-minimal (delete 'install-subtree) (delete 'install-credential-netrc) (delete 'install-credential-libsecret) + (delete 'install-completion) (add-after 'install 'remove-unusable-perl-commands (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))