提交 c646217e 编写于 作者: J Jim Meyering 提交者: Junio C Hamano

pre-commit.sample: don't print incidental SHA1

Make the sample pre-commit hook script discard
all git-rev-parse output, not just stderr.
Otherwise, it would print an SHA1.
Signed-off-by: NJim Meyering <meyering@redhat.com>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 f044fe2d
......@@ -7,7 +7,7 @@
#
# To enable this hook, rename this file to "pre-commit".
if git-rev-parse --verify HEAD 2>/dev/null
if git-rev-parse --verify HEAD >/dev/null 2>&1
then
against=HEAD
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册