diff options
author | Jim Meyering <jim@meyering.net> | 2009-05-16 12:21:50 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-05-16 11:57:17 -0700 |
commit | c646217e1366b0397552fad8c32acb47fbe8977d (patch) | |
tree | 87f58018c16a7b6fe33512e862b6dbb0b907a2db /templates | |
parent | tests: Add tests for missing format-patch long options (diff) | |
download | tgif-c646217e1366b0397552fad8c32acb47fbe8977d.tar.xz |
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>
Diffstat (limited to 'templates')
-rwxr-xr-x | templates/hooks--pre-commit.sample | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample index 0e49279c7f..0ba62076fb 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 |