#!/usr/bin/env python

# https://github.com/git/git/blob/master/Documentation/githooks.txt#L48
# This hook is invoked by 'git am'.  It takes no parameter, and is
# invoked after the patch is applied, but before a commit is made.
# 
# If it exits with non-zero status, then the working tree will not be
# committed after applying the patch.
# 
# It can be used to inspect the current working tree and refuse to
# make a commit if it does not pass certain test.
# 
# The default 'pre-applypatch' hook, when enabled, runs the
# 'pre-commit' hook, if the latter is enabled.
import gitta_hook
import sys
sys.argv.extend(sys.stdin.read().split())  # add stdin arguments
kwargs = {}
gitta_hook.trigger(*sys.argv, **kwargs)

