Sequoia PGP Manual Pages

0.4.0

NAME

sq-git-update-hook - A git update hook that enforces the policy

SYNOPSIS


sq-git update-hook [OPTIONS] REF_NAME OLD_OBJECT NEW_OBJECT

DESCRIPTION

A git update hook that enforces the policy.

Insert the following line into hooks/update on the shared git server to make it enforce the policy embedded in the repository starting at the trust root COMMIT.

sq-git update-hook --trust-root=<COMMIT> "$@"

When a branch is pushed that is not previously known to the server, sq-git update-hook checks that all commits starting from the trust root to the pushed commit adhere to the policy.

When a branch is pushed that is previously known to the server, i.e. the branch is updated, sq-git update-hook checks that all new commits starting from the commit previously known to the server to the pushed commit adhere to the policy. If there is no path from the previously known commit to the new one, the branch has been rebased. Then, we fall back to searching for a path from the trust root.

OPTIONS

Subcommand options

--policy-file=POLICY

Use an alternate policy.

The default policy is the openpgp-policy.toml file in the root of the repository's working tree.

--trust-root=COMMIT

The commit to use as a trust root

REF_NAME

The name of the ref being updated

Supplied as the first argument to the update hook, see githooks(5).

OLD_OBJECT

The old object name stored in the ref

Supplied as the second argument to the update hook, see githooks(5).

NEW_OBJECT

The new object name stored in the ref

Supplied as third argument to the update hook, see githooks(5).

Global options

See sq-git(1) for a description of the global options.

SEE ALSO

sq-git(1).

For the full documentation see <https://sequoia-pgp.gitlab.io/sequoia-git>.

VERSION

0.4.0