Browse Source

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 <meyering@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Jim Meyering 16 years ago committed by Junio C Hamano
parent
commit
c646217e13
  1. 2
      templates/hooks--pre-commit.sample

2
templates/hooks--pre-commit.sample

@ -7,7 +7,7 @@ @@ -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

Loading…
Cancel
Save