Please enable fast forward for user branches

Joel Brobecker brobecker@adacore.com
Tue Mar 30 06:17:17 GMT 2021


> > 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.

Actually, we do use the git-hooks (https://github.com/adacore/git-hooks)
which allow per-reference configuration of that restriction. That's
what I was trying to explain in my message.

Perhaps the receive.denynonfastforwards  pre-dates the use of
the git-hooks.

-- 
Joel


More information about the Binutils mailing list