1
0
mirror of https://github.com/git/git.git synced 2024-10-21 08:08:16 +02:00
Commit Graph

4 Commits

Author SHA1 Message Date
W. Trevor King
1a947ba3a3 pre-push.sample: Write error message to stderr
githooks(5) suggests:

  Information about why the push is rejected may be sent to the user
  by writing to standard error.

So follow that advice in the sample.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2014-09-11 15:26:35 -07:00
Thorsten Glaser
6897a64b65 fix shell syntax error in template
An if clause must not be empty; add a "colon" command.

Signed-off-by: Thorsten Glaser <t.glaser@tarent.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-08-30 09:56:30 -07:00
Wieland Hoffmann
3ea59412e8 pre-push.sample: Make the script executable
githooks(5) says that "[...]the .sample files are executable by default"
which was not true.

Signed-off-by: Wieland Hoffmann <themineo@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-06-11 11:22:00 -07:00
Aaron Schrab
87c86dd14a Add sample pre-push hook script
Create a sample of a script for a pre-push hook.  The main purpose is to
illustrate how a script may parse the information which is supplied to
such a hook.  The script may also be useful to some people as-is for
avoiding to push commits which are marked as a work in progress.

Signed-off-by: Aaron Schrab <aaron@schrab.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2013-01-18 11:13:22 -08:00