Git development
 help / color / mirror / Atom feed
* [RFC] Per-branch receive.* settings
@ 2011-01-18 23:07 Ævar Arnfjörð Bjarmason
  2011-01-19  0:12 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2011-01-18 23:07 UTC (permalink / raw)
  To: Git Mailing List

Currently you can do in your server's git config:

    [receive]
        denyDeletes = true
        denyNonFastForwards = true

But for most servers that's not what you want, you actually want to
deny those things to the master branch, but allow people to have their
private topic branches that they can reset. So how about allowing:

    [receive]
        denyDeletes = false
        denyNonFastForwards = false

    [branch "master"]
        denyDeletes = true
        denyNonFastForwards = true

I.e. have a per-branch setting that overrides the global setting?

(Of course ideally this would be:
    "branch.master.receive.{denyDeletes,denyNonFastForwards}"

But the *.ini format can only have a depth of three, so it has to be:

    "branch.master.{denyDeletes,denyNonFastForwards}"

Or perhaps:

    "branch.master.receive-{denyDeletes,denyNonFastForwards}"

Anyway, I can code this up if there's interest in it. This could also
be done with a .git/hooks/update hook, but IMO it's better to have
this as a documented setting for the most common things you want to
deny/allow.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-19  0:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-18 23:07 [RFC] Per-branch receive.* settings Ævar Arnfjörð Bjarmason
2011-01-19  0:12 ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox