[PATCH] pre-push.sample: Write error message to stderr

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]