From: bill lam <cbill.lam@gmail.com>
To: git <git@vger.kernel.org>
Subject: pre-commit hook
Date: Fri, 20 Feb 2009 17:11:27 +0800 [thread overview]
Message-ID: <20090220091127.GA7415@b2j> (raw)
The pre-commit hooks as follows.
10 # This is slightly modified from Andrew Morton's Perfect Patch.
11 # Lines you introduce should not have trailing whitespace.
12 # Also check for an indentation that has SP before a TAB.
13
14 if git-rev-parse --verify HEAD 2>/dev/null
15 then
16 git-diff-index -p -M --cached HEAD --
17 else
18 # NEEDSWORK: we should produce a diff with an empty tree here
19 # if we want to do the same verification for the initial import.
20 :
21 fi |
22 perl -e '
Will it also include binary files and thus corrupt data? And
"git-rev-parse" should already deprecated.
--
regards,
====================================================
GPG key 1024D/4434BAB3 2008-08-24
gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3
唐詩232 孟浩然 春曉
春眠不覺曉 處處聞啼鳥 夜來風雨聲 花落知多少
next reply other threads:[~2009-02-20 9:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-20 9:11 bill lam [this message]
2009-02-20 16:25 ` pre-commit hook Junio C Hamano
2009-02-21 3:57 ` bill lam
2009-02-21 11:28 ` Michael J Gruber
2009-02-22 10:58 ` bill lam
2009-02-22 11:17 ` Sverre Rabbelier
2009-02-22 14:13 ` bill lam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090220091127.GA7415@b2j \
--to=cbill.lam@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).