Skip to content

Commit c646217

Browse files
meyeringgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f044fe2 commit c646217

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/hooks--pre-commit.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#
88
# To enable this hook, rename this file to "pre-commit".
99

10-
if git-rev-parse --verify HEAD 2>/dev/null
10+
if git-rev-parse --verify HEAD >/dev/null 2>&1
1111
then
1212
against=HEAD
1313
else

0 commit comments

Comments
 (0)