author | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Jun 2008 23:08:05 +0000 (16:08 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 27 Jun 2008 05:08:25 +0000 (22:08 -0700) | ||
commit | 03e2b630f05b88da5ff43f194fed25755de44e8b | |
tree | b69205339b6dc8aa9149a1757579fc1c4de0106d | tree | snapshot |
parent | 049540435fa5f7f583b8f5af257322b17eac7375 | commit | diff |
Update sample pre-commit hook to use "diff --check"
Now "diff --check" can detect not just whitespace errors but also notices
leftover conflict marker lines, we can use it in the sample pre-commit
hook script.
These days the object layer knows about the empty tree object without
actually having one in the repository, so we can run the test even for the
initial commit.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Now "diff --check" can detect not just whitespace errors but also notices
leftover conflict marker lines, we can use it in the sample pre-commit
hook script.
These days the object layer knows about the empty tree object without
actually having one in the repository, so we can run the test even for the
initial commit.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
templates/hooks--pre-commit.sample | diff | blob | history |