git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* pre-commit hook
@ 2009-02-20  9:11 bill lam
  2009-02-20 16:25 ` Junio C Hamano
  0 siblings, 1 reply; 7+ messages in thread
From: bill lam @ 2009-02-20  9:11 UTC (permalink / raw)
  To: git

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 孟浩然  春曉
    春眠不覺曉  處處聞啼鳥  夜來風雨聲  花落知多少

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-22 14:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20  9:11 pre-commit hook bill lam
2009-02-20 16:25 ` 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

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).