hook: add sample template for push-to-checkout
authorAdam Spiers <git@adamspiers.org>
Thu, 15 Oct 2020 22:54:46 +0000 (23:54 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 16 Oct 2020 15:47:02 +0000 (08:47 -0700)
commite632c464d5dbbda72ae370ff6e9cbe31c01b0bb0
treefcc702677b25cb5f510c6087f23afafae82f6c3d
parenta5fa49ff0a8f3252c6bff49f92b85e7683868f8a
hook: add sample template for push-to-checkout

The template is a more-or-less exact translation to shell of the C
code for the default behaviour for git's push-to-checkout hook defined
in the push_to_deploy() function in builtin/receive-pack.c, to serve
as a convenient starting point for modification.

It also contains relevant text extracted from the git-config(1) and
githooks(5) man pages.

Signed-off-by: Adam Spiers <git@adamspiers.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
templates/hooks--push-to-checkout.sample [new file with mode: 0755]