Skip to content

Commit

Permalink
pre-commit.sample: don't print incidental SHA1
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
meyering authored and gitster committed May 16, 2009
1 parent f044fe2 commit c646217
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/hooks--pre-commit.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c646217

Please sign in to comment.