From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Albert Cui <albertqcui@gmail.com>,
Derrick Stolee <stolee@gmail.com>,
"brian m. carlson" <sandals@crustytoothpaste.net>,
Albert Cui via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org
Subject: Re: [PATCH v2] hooks: propose project configured hooks
Date: Thu, 08 Apr 2021 00:23:27 +0200 [thread overview]
Message-ID: <877dldka3k.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqh7khzwv1.fsf@gitster.g>
On Wed, Apr 07 2021, Junio C Hamano wrote:
> Albert Cui <albertqcui@gmail.com> writes:
>
>>> Here are the hard lines I draw:
>>>
>>> 1. This should not happen in "git clone" (other than maybe a message
>>> over stderr that hooks are available to be configured through a
>>> different command).
>>>
>>> 2. Hooks should not update in "git checkout" (other than a message
>>> that hooks have updated).
>>>
>>
>> To Ævar's point, maybe it would help to separate the two user bases of
>> project configured hooks.
>> (1) Employee working at BigCorp. They are cloning from a trusted
>> remote on company machines where the company controls what gets
>> installed and how Git is configured. Their motivation is to make
>> changes to their local clone and submit changes to a central
>> repository.
>
> Hmph.
>
> If the assumption is that their configuration is controlled by
> BigCorp when they arrive at their desk, why do you even need any
> change to upstream Git, especially with Emily's "configuration file
> tells Git what hook scripts to run" in sight?
FWIW I've been assuming that this is wanted for BigCorp people who have
devs using vanilla OS's / XCode etc. Having managed laptops with a
managed /etc/gitconfig certainly makes some things easier...
> Wouldn't it be just a matter of the BigCorp installing
> /etc/gitconfig on their BigCorpLinux installations?
Whether you're at BigCorp or not you've got the problem with such a
/etc/gitconfig that it applies to all repos, but someone at BigCorp
might clone both a BigCorp repo (wants custom config, hooks etc.), and
also some random node.js github.com project (should have no such custom
config).
Having a .gitconfig or otherwise making the repo suggest/control the
config/hooks is an elegant way around that issue.
You otherwise need to do something like have config includes apply a
rule to ~/work/, and then hope your users follow your suggestion to
clone repos in the ~/work/ folder.
I think extending config includes to e.g. operate on a glob of the
remote URI was suggested at some point, which would make use-cases like
that easier than they are now, and would be a less invasive change than
what's being discussed here.
But right now we don't have that, so we have a gap there...
next prev parent reply other threads:[~2021-04-07 22:23 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-18 22:03 [PATCH] hooks: propose repository owner configured hooks Albert Cui via GitGitGadget
2021-03-18 22:29 ` Junio C Hamano
2021-03-18 23:45 ` Albert Cui
2021-03-19 1:28 ` brian m. carlson
2021-03-19 10:27 ` Ævar Arnfjörð Bjarmason
2021-04-06 0:35 ` Albert Cui
2021-04-07 22:47 ` Ævar Arnfjörð Bjarmason
2021-06-21 19:36 ` Jonathan Tan
2021-06-21 20:35 ` Ævar Arnfjörð Bjarmason
2021-03-26 1:43 ` [PATCH v2] hooks: propose project " Albert Cui via GitGitGadget
2021-03-29 23:20 ` Emily Shaffer
2021-04-01 20:02 ` Albert Cui
2021-03-30 15:24 ` Derrick Stolee
2021-04-05 22:45 ` Albert Cui
2021-04-05 23:09 ` Junio C Hamano
2021-04-05 23:40 ` Albert Cui
2021-04-06 0:13 ` Junio C Hamano
2021-04-06 0:27 ` Albert Cui
2021-04-06 23:15 ` brian m. carlson
2021-04-07 7:53 ` Ævar Arnfjörð Bjarmason
2021-04-07 13:09 ` Derrick Stolee
2021-04-07 18:40 ` Albert Cui
2021-04-07 20:02 ` Junio C Hamano
2021-04-07 22:23 ` Ævar Arnfjörð Bjarmason [this message]
2021-04-15 16:52 ` Ed Maste
2021-04-15 19:41 ` Junio C Hamano
2021-04-15 20:37 ` Ed Maste
2021-04-15 20:50 ` Junio C Hamano
2021-04-15 22:28 ` brian m. carlson
2021-04-02 9:59 ` Ævar Arnfjörð Bjarmason
2021-04-05 23:42 ` Albert Cui
2021-04-02 10:30 ` Ævar Arnfjörð Bjarmason
2021-04-03 0:58 ` Albert Cui
2021-04-24 1:38 ` [PATCH v3] " Albert Cui via GitGitGadget
2021-04-28 2:48 ` Junio C Hamano
2021-05-05 19:11 ` [PATCH v4] " Albert Cui via GitGitGadget
2021-06-03 3:31 ` Jonathan Tan
2021-06-03 20:16 ` Albert Cui
2021-06-03 22:10 ` Jonathan Tan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877dldka3k.fsf@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=albertqcui@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.com \
--cc=sandals@crustytoothpaste.net \
--cc=stolee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).