All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pre-push.sample: Write error message to stderr
@ 2014-09-11 20:35 W. Trevor King
  0 siblings, 0 replies; only message in thread
From: W. Trevor King @ 2014-09-11 20:35 UTC (permalink / raw)
  To: Git; +Cc: Thorsten Glaser, Wieland Hoffmann, Aaron Schrab, W. Trevor King

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>
---
 templates/hooks--pre-push.sample | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/hooks--pre-push.sample b/templates/hooks--pre-push.sample
index 1f3bceb..7cb911c 100755
--- a/templates/hooks--pre-push.sample
+++ b/templates/hooks--pre-push.sample
@@ -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 "Found WIP commit in $local_ref, not pushing" >&2
 			exit 1
 		fi
 	fi
-- 
2.1.0.60.g85f0837

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2014-09-11 20:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-11 20:35 [PATCH] pre-push.sample: Write error message to stderr W. Trevor King

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.