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 214AE20248; Thu, 7 Mar 2019 02:42:42 +0000 (UTC) Date: Thu, 7 Mar 2019 02:42:41 +0000 From: Eric Wong To: Konstantin Ryabitsev Cc: meta@public-inbox.org Subject: Re: RFE: default hooks for git repositories Message-ID: <20190307024241.lhlf65uqsbjywfv3@dcvr> References: <20190306170302.GA21727@chatter.qube.local> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20190306170302.GA21727@chatter.qube.local> List-Id: 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. > We currently do it via a cronjob, but unless we run it very frequently, > there's a delay between when a new shard is created and when we add the > hooks to it. I've also been thinking of a way to get mirrors to automatically know about new epochs, too. Maybe submodules can be used... Note: I prefer the "epoch" term for the $N.git dirs over "shard" to disambiguate it from the Xapian partitioning we do.