X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=templates%2Fhooks--pre-commit.sample;h=0ba62076fb4a381e588eba90ed639dd560860fd3;hb=d1f6c18bd6ea5fd373f9f6356e02854678ffa0fd;hp=0e49279c7f7b805c78f1bc4760a0d1c70a84a0d9;hpb=a0d74d160f3d416be8f7fbfd18fee0eebf40d8e0;p=git.git diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample index 0e49279c7..0ba62076f 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