summaryrefslogtreecommitdiff
path: root/templates/hooks--pre-commit
AgeCommit message (Collapse)AuthorFilesLines
2005-09-07Big tool rename.Libravatar Junio C Hamano1-2/+2
As promised, this is the "big tool rename" patch. The primary differences since 0.99.6 are: (1) git-*-script are no more. The commands installed do not have any such suffix so users do not have to remember if something is implemented as a shell script or not. (2) Many command names with 'cache' in them are renamed with 'index' if that is what they mean. There are backward compatibility symblic links so that you and Porcelains can keep using the old names, but the backward compatibility support is expected to be removed in the near future. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-20[PATCH] Fix git-commit-script to output on stderr when -v failsLibravatar Marco Costalba1-6/+6
When git-commit-script is called with -v option and verify test fails result is print on stdout instead of stderr. [jc: The original patch from Marco updated git-commit-script that still had the piece of code in question, which has been moved to an example hook script on its own, so I transplanted the patch to that new file instead.] Signed-off-by: Marco Costalba <mcostalba@yahoo.it> Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-20Make sample pre-commit hook output Emacs friendly.Libravatar Junio C Hamano1-1/+2
Use the common error message format, "filename:lineno: body"; this way, problematic lines can be jumped to from the Emacs compilation buffer by C-x `. Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-19Add commit hook and make the verification customizable.Libravatar Junio C Hamano1-0/+60
There are three hooks: - 'pre-commit' is given an opportunity to inspect what is being committed, before we invoke the EDITOR for the commit message; - 'commit-msg' is invoked on the commit log message after the user prepares it; - 'post-commit' is run after a successful commit is made. The first two can interfere to stop the commit. The last one is for after-the-fact notification. The earlier built-in commit checker is now moved to pre-commit. Signed-off-by: Junio C Hamano <junkio@cox.net>