author | Pierre Habouzit <madcoder@debian.org> | |
Thu, 16 Apr 2009 20:00:44 +0000 (22:00 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 18 Apr 2009 04:26:11 +0000 (21:26 -0700) | ||
commit | aed97c677cdfd1b9bbc9b33b5418ad4a29109082 | |
tree | a79f1ffa4fd4b5521888b8e6e83a68137267beee | tree | snapshot |
parent | 55f0566f6d7269a56751333e0943b50237ce6a85 | commit | diff |
hook/update: example of how to prevent branch creation
Since git doesn't provide a receive.denyBranchCreation or similar, here is
an example of how to be sure users cannot create branches remotely by
pushing a new reference.
This setup has been proven useful to prevent creation of spurious branches
because of users having their remote.origin.push set to HEAD, when they
use `git push` while being on a local topic branch of theirs instead of
the proper one.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Since git doesn't provide a receive.denyBranchCreation or similar, here is
an example of how to be sure users cannot create branches remotely by
pushing a new reference.
This setup has been proven useful to prevent creation of spurious branches
because of users having their remote.origin.push set to HEAD, when they
use `git push` while being on a local topic branch of theirs instead of
the proper one.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
templates/hooks--update.sample | diff | blob | history |