Missing git file hooks / post-receive.sample

I used git 1.7.1 on CentOs 6 server, and when I ran git --bare initon my_repo.git, I checked my_repo.git / hooks and I could see all the hooks, including post-receive.sample .

Now I use git 2.4.1 on the Centos 7 server, and the post-receive.sample file is missng, all the other hooks are there, but not the one I need.

I know that I can copy the file from the previous repo and then change the contents as needed, but I would like to know why post-receive.sample is not created as before.

+4
source share
1 answer

-, post-receive.sample commit 8d714b11df2b65e5f4272c1616e561930010be90:

commit 8d714b11df2b65e5f4272c1616e561930010be90
Author: Gerrit Pape <pape@smarden.org>
Date:   Tue Sep 27 11:56:53 2011 +0000

    templates/hooks--*: remove sample hooks without any functionality

    Remove the sample post-commit and post-receive hooks.  The sample
    post-commit doesn't contain any sample functionality and the comments do
    not provide more information than already found in the documentation.
    The sample post-receive hooks doesn't provide any sample functionality
    either and refers in the comments to a contrib hook that might be
    installed in different locations on different systems, which isn't that
    helpful.

    Signed-off-by: Gerrit Pape <pape@smarden.org>
    Signed-off-by: Junio C Hamano <gitster@pobox.com>
+5

Source: https://habr.com/ru/post/1610329/


All Articles