From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id iWDPJdu4YmCyXwAAWB0awg (envelope-from ) for ; Tue, 30 Mar 2021 01:36:27 -0400 Received: by simark.ca (Postfix, from userid 112) id 8DF051EE0E; Tue, 30 Mar 2021 01:36:27 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B430A1E783 for ; Tue, 30 Mar 2021 01:36:26 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85FB438515E4; Tue, 30 Mar 2021 05:36:25 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 85FB438515E4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1617082585; bh=pt3sPCvjU3AGru3UyRmFF24WoOmpvv6whY+M7/PWUsk=; h=Date:To:Subject:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=d9ztQFAwKwWNWfxTg5XP+5b7L0j3PhdTtBOD//zAuAM5W5eJquL0gyz22a078NMny u6+KUr+1BtsVhMx8S+ywmbx6K6jf02Xqn7GVyb/O43FRLjZBj1UzLNtY4FShRyrFoC fYv3/rN+LsJux6PPa9wSKFOk0MKhCWvftGJyqf+4= Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by sourceware.org (Postfix) with ESMTP id 44FF23858002; Tue, 30 Mar 2021 05:36:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 44FF23858002 Received: from vapier (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1DEB9335C9A; Tue, 30 Mar 2021 05:36:21 +0000 (UTC) Date: Tue, 30 Mar 2021 01:36:20 -0400 To: Joel Brobecker Subject: Re: Please enable fast forward for user branches Message-ID: Mail-Followup-To: Joel Brobecker , Martin =?utf-8?B?TGnFoWth?= , Binutils , gdb-patches@sourceware.org References: <1af95023-580d-6774-c307-1a38bf3dc073@suse.cz> <20210330040939.GC11111@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210330040939.GC11111@adacore.com> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mike Frysinger via Gdb-patches Reply-To: Mike Frysinger Cc: Binutils , gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 30 Mar 2021 08:09, Joel Brobecker wrote: > > I would like to sync up my binutils user branches to the primary server. > > However, I can't do rebases which makes it not usable at all: > > > > $ git push origin me/startswith -f > > Enumerating objects: 257, done. > > Counting objects: 100% (257/257), done. > > Delta compression using up to 16 threads > > Compressing objects: 100% (140/140), done. > > Writing objects: 100% (140/140), 22.31 KiB | 951.00 KiB/s, done. > > Total 140 (delta 134), reused 0 (delta 0), pack-reused 0 > > remote: Resolving deltas: 100% (134/134), completed with 117 local objects. > > remote: error: denying non-fast-forward refs/heads/users/marxin/startswith (you should pull first) > > To ssh://sourceware.org/git/binutils-gdb.git > > ! [remote rejected] me/startswith -> users/marxin/startswith (non-fast-forward) > > error: failed to push some refs to 'ssh://sourceware.org/git/binutils-gdb.git' > > I think the error above comes from Git itself, and is related > to the configuration of the repository. In particular, I found > that our binutils-gdb repository's configuration has: > > | [receive] > | denynonfastforwards = true > > Not sure what the history of this is. > > In the meantime, I've modified the git-hooks configuration so that, > if the above is lifted, users will be allowed to do non-fast-forward > updates on users/.* branches. iiuc, out of the box, the default git implementation has one knob for all branches (the one you found). we set it that way so people don't push non-fast-forwards to the important branches (e.g. "master" or any of the many release branches). that all makes perfect sense -- we don't want people to accidentally, or on purpose, rewrite (i.e. rewind) history once it's gone public. unfortunately, the default git configs don't have ref filtering to allow denynonfastforwards=false on refs/heads/users/*. any services that have that functionality implemented it themselves. which is what we'd have to do with custom git hooks if we wanted to. but it looks like no one has volunteered to implement the hook to block most refs by default but only allow a specific subset. probably because they don't want to be on the hook for when it needs debugging. -mike