From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH OSSTEST] Switch to merged qemu-xen{, -traditional}.git trees Date: Wed, 21 Oct 2015 11:50:46 +0100 Message-ID: <1445424646.9563.86.camel@citrix.com> References: <1442482630.18856.145.camel@citrix.com> <1442482648-25666-1-git-send-email-ian.campbell@citrix.com> <22010.38503.791420.451291@mariner.uk.xensource.com> <1442486620.18856.168.camel@citrix.com> <1442486842.18856.170.camel@citrix.com> <22030.35325.690324.254600@mariner.uk.xensource.com> <1443793989.11707.121.camel@citrix.com> <22052.55175.145023.84360@mariner.uk.xensource.com> <1445337272.9563.28.camel@citrix.com> <1445422576.9563.74.camel@citrix.com> <22055.27242.824758.788120@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <22055.27242.824758.788120@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: xen-devel@lists.xen.org, wei.liu2@citrix.com, stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org On Wed, 2015-10-21 at 11:35 +0100, Ian Jackson wrote: > Ian Campbell writes ("Re: [Xen-devel] [PATCH OSSTEST] Switch to merged > qemu-xen{, -traditional}.git trees"): > > On Tue, 2015-10-20 at 11:34 +0100, Ian Campbell wrote: > > > * See if there is a way to prevent pushes to the old trees (e.g. a > > > setting in their .git/config file). > > > > It appears that it is trivial to block force pushes or pushes to the > > current branch (which I think might be meaningless for a bare repo) but > > that blocking all pushes involves using .git/hooks. I think this is > > probably too much faff, or at least not worth putting on the critical > > path. > > These hooks aren't too hard to write. See > xenbits:~xen/git/xen.git/hooks/pre-receive > for an example. In this case it looks then like: #!/bin/sh set -e echo >&2 "Pushes are not allowed to this tree" exit 1 is all that is needed. Ian.