From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 41CC7C07E95 for ; Fri, 16 Jul 2021 06:39:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14D05613EB for ; Fri, 16 Jul 2021 06:39:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235006AbhGPGmG (ORCPT ); Fri, 16 Jul 2021 02:42:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230011AbhGPGmF (ORCPT ); Fri, 16 Jul 2021 02:42:05 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 797F2C06175F for ; Thu, 15 Jul 2021 23:39:11 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id nd37so13554299ejc.3 for ; Thu, 15 Jul 2021 23:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:references:user-agent:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=4kMB+cN735op/ycsK8hg3DYkZozTZqMJyp+cSRAf/z4=; b=nDZm1HT2FSj67MfpFGC4nTyvgpXzbzEs+o3lDL5J7DEkZypeDTcmhFm55ANxnDqBIs G8uIZMmHlwvImSydDD3/KEVdFtTjt7UeYsARSIz9Z5v86onq1kXTrd9C/B9Jo/+9HQDp ZTUmEP+L6MhY0gECvBgW2KVnAngy/ZdUkzNgKXeLZR12rsqqF6V9TO/e/mObclOIgZSW WpttVrg2v4aoTGVvZCE8RtkghhOnb9vr7de5uQ6fyaze2RAJAv0hbn7F6+mugBe4J9w3 f9jWh2R/7zDlsvha29L4t0m6EQG56rAiqTA+PFUJINvbGlMd2CuCYvHhxx/nQs30d+gB +CzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:references:user-agent :in-reply-to:message-id:mime-version:content-transfer-encoding; bh=4kMB+cN735op/ycsK8hg3DYkZozTZqMJyp+cSRAf/z4=; b=lhSwb91IkN6RV1lkhpeeLuvqzCB2WL8SbWnYkLIuYg0sDoB7IK+ywJpdnUDX0E9ZN1 /ap/erDa4TlPRXhXiV2XvVgELNOuHjC8Zej1Q5zOPytJZChabc+M03g35KTF/miQGCqx MXLPNgLezQTClrEElVbI8CtOGM2bvhYWFLO9aQwvNEnGUdgzaf354qIygD24fpJm7zRa D73QX+NmVw4ga6yPyJ913XE8l0NFm92GhSTLXomlyeE2uDeAiLflOYX51aeBPmGCn2BE nmTU7IeT09oFZJ2LRCF1QAF1tSBmoWUehJRZvFj/5AYXwxoJO+8g0qNxSR7oY/7jk9Ua WBHg== X-Gm-Message-State: AOAM53104RW7Ej6zMKvQFOtga6e3bPCoMCAq+4qf1egaHf4TdrDA0Tnt 2mwoKUIgu4ikZOvQSbVfnR1P01suXAM= X-Google-Smtp-Source: ABdhPJzzwlyqvrALIB0Ut1c0EduuFhFLq2LLdgzNFO9+IdaG9FVs6oF6CIg6YcN4v1Rlm2TLC1l0IQ== X-Received: by 2002:a17:906:c107:: with SMTP id do7mr10075128ejc.469.1626417549591; Thu, 15 Jul 2021 23:39:09 -0700 (PDT) Received: from evledraar (j57224.upc-j.chello.nl. [24.132.57.224]) by smtp.gmail.com with ESMTPSA id w24sm3295075edv.59.2021.07.15.23.39.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jul 2021 23:39:08 -0700 (PDT) From: =?utf-8?B?w4Z2YXIgQXJuZmrDtnLDsA==?= Bjarmason To: Felipe Contreras Cc: git@vger.kernel.org, Luke Shumaker , Junio C Hamano , Philippe Blain Subject: Re: [PATCH v3 1/1] completion: graduate out of contrib Date: Fri, 16 Jul 2021 08:36:52 +0200 References: <20210710234629.17197-1-felipe.contreras@gmail.com> <20210714202344.614468-1-felipe.contreras@gmail.com> <20210714202344.614468-2-felipe.contreras@gmail.com> <87bl74zdtb.fsf@evledraar.gmail.com> <878s28zdmz.fsf@evledraar.gmail.com> <60f088b054e74_519c2084d@natae.notmuch> User-agent: Debian GNU/Linux 11 (bullseye); Emacs 27.1; mu4e 1.5.13 In-reply-to: <60f088b054e74_519c2084d@natae.notmuch> Message-ID: <87zgumyd7w.fsf@evledraar.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On Thu, Jul 15 2021, Felipe Contreras wrote: > =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason wrote: >>=20 >> On Thu, Jul 15 2021, =C3=86var Arnfj=C3=B6r=C3=B0 Bjarmason wrote: >>=20 >> > On Wed, Jul 14 2021, Felipe Contreras wrote: >> >> [...] >> >> @@ -2399,7 +2399,7 @@ test_expect_success 'sourcing the completion sc= ript clears cached --options' ' >> >> verbose test -n "$__gitcomp_builtin_checkout" && >> >> __gitcomp_builtin notes_edit && >> >> verbose test -n "$__gitcomp_builtin_notes_edit" && >> >> - . "$GIT_BUILD_DIR/contrib/completion/git-completion.bash" && >> >> + . "$GIT_BUILD_DIR/extra/completion/git-completion.bash" && >> >> verbose test -z "$__gitcomp_builtin_checkout" && >> >> verbose test -z "$__gitcomp_builtin_notes_edit" >> >> ' >> >> >> >> diff --git a/t/t9903-bash-prompt.sh b/t/t9903-bash-prompt.sh >> >> index bbd513bab0..784e523fd4 100755 >> >> --- a/t/t9903-bash-prompt.sh >> >> +++ b/t/t9903-bash-prompt.sh >> >> @@ -10,7 +10,7 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME >> >>=20=20 >> >> . ./lib-bash.sh >> >>=20=20 >> >> -. "$GIT_BUILD_DIR/contrib/completion/git-prompt.sh" >> >> +. "$GIT_BUILD_DIR/extra/completion/git-prompt.sh" >> >>=20=20 >> >> actual=3D"$TRASH_DIRECTORY/actual" >> >> c_red=3D'\\[\\e[31m\\]' >> > >> > It's more of a "for bonus points", but a nic way to round-trip this >> > would be to make this work with GIT_TEST_INSTALLED. >> > >> > I.e. source these relative to GIT_EXEC_PATH, not $GIT_BUILD_DIR, I thi= nk >> > that just sourcing them as e.g.: >> > >> > . git-completion.bash >> > >> > But the GIT_TEST_INSTALLED case is tricker, maybe we'd need to add a >> > "git --share-path" :( >>=20 >> I forgot to include this not-working patch, i.e. I've got no idea what >> the "something" should be other than the harder thing of compiling >> "sharedir" into git and making "git --share-path" work. > > I don't think there's a "something" that would make sense. > > It would be something like '/opt/git/bin/completion'? I think more importantly if they're going to be "first-class" components that we have some native way of getting them to the user. I.e. once you install git being able to load them in your shell as: . git-path . git-completion Or whatever, which means either putting them in $PATH (i.e. we'd drop them in bin/ along with the non-dashed-built-ins like git-upload-pack etc.), or something like: . "$(git --completion-path)"/bash . "$(git --completion-path)"/zsh Or maybe: . "$(git --extras-path)"/completion/bash.sh . "$(git --extras-path)"/prompt.sh ?