{"thread":{"id":"15095","subject":"[PATCH] Updated githooks docs to cover pre-push script","startedAt":"2008-08-19T19:07:18Z","lastAt":"2008-08-19T19:07:18Z","messageCount":1,"participants":["Scott Chacon"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"87739","messageId":"d411cc4a0808191207j28380749i922ae9981f3e32dd@mail.gmail.com","threadId":"15095","inReplyTo":null,"subject":"[PATCH] Updated githooks docs to cover pre-push script","fromName":"Scott Chacon","fromEmail":"schacon@gmail.com","sentAt":"2008-08-19T19:07:18Z","receivedAt":"2008-08-19T19:07:18Z","isPatch":true,"sender":{"key":"schacon@gmail.com","avatar":"https://gravatar.com/avatar/9b13a8a078e1dcf8588c4eea9554445d51ebed6c41b51f56f4d96738130b05c6?d=mp&s=160"},"body":"The new entry covers how the pre-push script runs and outlines\npossible use-cases for the script.\n\nSigned-off-by: Scott Chacon <schacon@gmail.com>\n---\n Documentation/githooks.txt |   12 ++++++++++++\n 1 files changed, 12 insertions(+), 0 deletions(-)\n\ndiff --git a/Documentation/githooks.txt b/Documentation/githooks.txt\nindex 046a2a7..939181f 100644\n--- a/Documentation/githooks.txt\n+++ b/Documentation/githooks.txt\n@@ -299,6 +299,18 @@ This hook is invoked by 'git-gc --auto'. It takes\nno parameter, and\n exiting with non-zero status from this script causes the 'git-gc --auto'\n to abort.\n\n+pre-push\n+-----------\n+\n+This hook is invoked by 'git push'. It takes no parameter, and\n+exiting with non-zero status from this script causes the 'git push'\n+command to abort.\n+\n+This script is useful for self-enforcing policies, such as running a script\n+that checks for code-compliance, running automated tests, etc.  You can\n+use this script to help ensure that your pushes are sane in an automatic\n+fashion.\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\n--\n1.6.0.GIT\n"}]}