Missing git file hooks/post-receive.sample
Asked Answered
H

1

6

I was using git 1.7.1 on CentOs 6 server and when I run git --bare init on my_repo.git I checked my_repo.git/hooks and I could see all hooks, including post-receive.sample.

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

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

Hersch answered 5/10, 2015 at 20:41 Comment(0)
C
7

Apparently, post-receive.sample was removed in commit 8d714b11df2b65e5f4272c1616e561930010be90:

commit 8d714b11df2b65e5f4272c1616e561930010be90
Author: Gerrit Pape <[email protected]>
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 <[email protected]>
    Signed-off-by: Junio C Hamano <[email protected]>
Curet answered 5/10, 2015 at 20:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.