pre-push.sample: Write error message to stderr
authorW. Trevor King <wking@tremily.us>
Thu, 11 Sep 2014 20:35:30 +0000 (13:35 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 11 Sep 2014 22:26:35 +0000 (15:26 -0700)
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>
templates/hooks--pre-push.sample
index 1f3bcebfd76ae1b37e1542631a87e5a5e3e6b1eb..69e3c67b00f482449e77945eb114f58244078b1e 100755 (executable)
@@ -45,7 +45,7 @@ do
                commit=`git rev-list -n 1 --grep '^WIP' "$range"`
                if [ -n "$commit" ]
                then
-                       echo "Found WIP commit in $local_ref, not pushing"
+                       echo >&2 "Found WIP commit in $local_ref, not pushing"
                        exit 1
                fi
        fi