From: Jim Meyering Date: Sat, 16 May 2009 10:21:50 +0000 (+0200) Subject: pre-commit.sample: don't print incidental SHA1 X-Git-Tag: v1.6.3.2~39 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=c646217e1366b0397552fad8c32acb47fbe8977d;p=git.git 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: Jim Meyering Signed-off-by: Junio C Hamano --- diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample index 0e49279c7..0ba62076f 100755 --- a/templates/hooks--pre-commit.sample +++ b/templates/hooks--pre-commit.sample @@ -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