OSDN Git Service
(root)
/
git-core
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce1d3a9
)
pre-push.sample: Write error message to stderr
author
W. Trevor King
<wking@tremily.us>
Thu, 11 Sep 2014 20:35:30 +0000
(13:35 -0700)
committer
Junio 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
patch
|
blob
|
history
diff --git
a/templates/hooks--pre-push.sample
b/templates/hooks--pre-push.sample
index
1f3bceb
..
69e3c67
100755
(executable)
--- 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
>&2
"Found WIP commit in $local_ref, not pushing"
exit 1
fi
fi