From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 89C7620248; Fri, 8 Mar 2019 23:01:16 +0000 (UTC) Date: Fri, 8 Mar 2019 23:01:16 +0000 From: Eric Wong To: Konstantin Ryabitsev Cc: meta@public-inbox.org Subject: Re: RFE: default hooks for git repositories Message-ID: <20190308230116.7lnfrcns4lscxrir@whir> References: <20190306170302.GA21727@chatter.qube.local> <20190307024241.lhlf65uqsbjywfv3@dcvr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190307024241.lhlf65uqsbjywfv3@dcvr> List-Id: Eric Wong wrote: > Konstantin Ryabitsev wrote: > > Hello: > > > > Since V2 creates git shards automatically, I suggest there should be a way > > to tell it to install some set of default hooks in all new git repos it > > creates. The easiest would be by using a skel dir and specifying it in > > PI_CONFIG: > > > > [publicinbox] > > githooksskel=/usr/share/public-inbox/hooks > > Seems reasonable. Though "gitInitTemplateDir" would probably be > easier-to-implement and cover hooks. This should let us avoid > creating needless "branches" directories and "info/exclude" > files, as well. > > Curious, what hooks do you use? I've never used any. Actually, is there a reason the git-native "init.templateDir" configuration variable isn't sufficient? i.e. something about public-inbox git repos should be set/unset which is fundamentally incompatible with code-oriented git repos? I've been trying to use normal git defaults and directives as possible to minimize the learning curve. I've started working on a dirty patch to implement this feature; but it's rather intrusive and I'm not sure I like it...