Commit graph

5 commits

Author SHA1 Message Date
Junio C Hamano 89e2c5f17b Add commit hook and make the verification customizable.
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>
2005-08-19 16:23:31 -07:00
Josef Weidendorfer c65a9470fb [PATCH] Fixed/Extended example for update hook
Add sample code to distinguish --force rebased head and simple
fast-forward.  At the same time fixes a real bug; the "new ref"
path was using a wrong parameter.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-15 03:00:21 -07:00
Petr Baudis a682ef9f06 [PATCH] Use $DESTDIR instead of $dest
$DESTDIR is more usual during the build than $dest and is what
is usually used in the makefiles, so let's use it too.

Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-12 10:38:23 -07:00
Junio C Hamano d3af621b14 Redo the templates generation and installation.
Per discussion with people interested in binary packaging,
change the default template location from /etc/git-core to
/usr/share/git-core hierarchy.  If a user wants to run git
before installing for whatever reason, in addition to adding
$src to the PATH environment variable, git-init-db can be run
with --template=$src/templates/blt/ parameter.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-06 13:49:26 -07:00
Junio C Hamano 8d5afef0f9 Install sample hooks
A template mechanism to populate newly initialized repository
with default set of files is introduced.  Use it to ship example
hooks that can be used for update and post update checks, as
Josef Weidendorfer suggests.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2005-08-03 16:27:38 -07:00