From c646217e1366b0397552fad8c32acb47fbe8977d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 16 May 2009 12:21:50 +0200 Subject: [PATCH] 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 --- templates/hooks--pre-commit.sample | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.30.2