summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f044fe2)
raw | patch | inline | side by side (parent: f044fe2)
author | Jim Meyering <jim@meyering.net> | |
Sat, 16 May 2009 10:21:50 +0000 (12:21 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 16 May 2009 18:57:17 +0000 (11:57 -0700) |
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>
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>
templates/hooks--pre-commit.sample | patch | blob | history |
index 0e49279c7f7b805c78f1bc4760a0d1c70a84a0d9..0ba62076fb4a381e588eba90ed639dd560860fd3 100755 (executable)
#
# 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