Name
pre-commit — Notification just prior to commit completion.
Description
The pre-commit
hook
is run just before a commit transaction is promoted to a new revision.
Typically, this hook is used to protect against commits that are
disallowed due to content or location (e.g., your site might require
that all commits to a certain branch include a ticket number from the
bug tracker, or that the incoming log message is nonempty).
If the pre-commit
hook
program returns a nonzero exit value, the commit is aborted, the
commit transaction is removed, and anything printed to stderr is marshaled back to the
client.
Input parameter(s)
The command-line arguments passed to the hook program, in order, are:
Repository path
Commit transaction name
Common uses
Change validation and control.
Get Version Control with Subversion, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.