pre-commit-try-repo - Man Page
pre-commit-try-repo – Try the hooks in a repository, useful for developing new hooks
Synopsis
pre-commit try-repo [-h] [--color {auto,always,never}] [-c CONFIG] [--ref REF] [--verbose] [--all-files | --files [FILES ...]] [--show-diff-on-failure] [--hook-stage {commit-msg,post-checkout,post-commit,post-merge,post-rewrite,pre-commit,pre-merge-commit,pre-push,pre-rebase,prepare-commit-msg,manual}] [--remote-branch REMOTE_BRANCH] [--local-branch LOCAL_BRANCH] [--from-ref FROM_REF] [--to-ref TO_REF] [--pre-rebase-upstream PRE_REBASE_UPSTREAM] [--pre-rebase-branch PRE_REBASE_BRANCH] [--commit-msg-filename COMMIT_MSG_FILENAME] [--prepare-commit-message-source PREPARE_COMMIT_MESSAGE_SOURCE] [--commit-object-name COMMIT_OBJECT_NAME] [--remote-name REMOTE_NAME] [--remote-url REMOTE_URL] [--checkout-type CHECKOUT_TYPE] [--is-squash-merge IS_SQUASH_MERGE] [--rewrite-command REWRITE_COMMAND] repo [hook]
Options
Positional Arguments
- repo
Repository to source hooks from.
- hook
A single hook-id to run.
Optional Arguments
- -h, --help
Show a help message and exit.
- --color {auto,always,never}
Whether to use color in output. Defaults to auto.
- --ref, --rev REF
Manually select a rev to run against, otherwise the HEAD revision will be used.
- -c, --config CONFIG
Path to alternate config file.
- --verbose, -v
- --all-files, -a
Run on all the files in the repo.
- --files [FILES ...]
Specific filenames to run hooks on.
- --show-diff-on-failure
When hooks fail, run git-diff(1) directly afterward.
- --hook-stage {commit-msg,post-checkout,post-commit,post-merge,post-rewrite,pre-commit,pre-merge-commit,pre-push,pre-rebase,prepare-commit-msg,manual}]
The stage during which the hook is fired. One of commit-msg, post-checkout, post-commit, post-merge, post-rewrite, pre-commit, pre-merge-commit, pre-push, pre-rebase, prepare-commit-msg, manual.
- --remote-branch REMOTE_BRANCH
Remote branch ref used by git-push(1).
- --local-branch LOCAL_BRANCH
Local branch ref used by git-push(1).
- --from-ref, --source, -s FROM_REF
(For usage with --to-ref) – this option represents the original ref in a from_ref...to_ref diff expression. For pre-push hooks, this represents the branch you are pushing to. For post-checkout hooks, this represents the branch that was previously checked out.
- --to-ref, --origin, -o TO_REF
(For usage with --from-ref) – this option represents the destination ref in a from_ref...to_ref diff expression. For pre-push hooks, this represents the branch being pushed. For post-checkout hooks, this represents the branch that is now checked out.
- --pre-rebase-upstream PRE_REBASE_UPSTREAM
The upstream from which the series was forked.
- --pre-rebase-branch PRE_REBASE_BRANCH
The branch being rebased, and is not set when rebasing the current branch.
- --commit-msg-filename COMMIT_MSG_FILENAME
Filename to check when running during commit-msg.
- --prepare-commit-message-source PREPARE_COMMIT_MESSAGE_SOURCE
Source of the commit message (typically the second argument to .git/hooks/prepare-commit-msg)
- --commit-object-name COMMIT_OBJECT_NAME
Commit object name (typically the third argument to .git/hooks/prepare-commit-msg)
- --remote-name REMOTE_NAME
Remote name used by git-push(1).
- --remote-url REMOTE_URL
Remote url used by git-push(1).
- --checkout-type CHECKOUT_TYPE
Indicates whether the checkout was a branch checkout (changing branches, flag=1) or a file checkout (retrieving a file from the index, flag=0).
- --is-squash-merge IS_SQUASH_MERGE
During a post-merge hook, indicates whether the merge was a squash merge
- --rewrite-command REWRITE_COMMAND
During a post-rewrite hook, specifies the command that invoked the rewrite
See Also
pre-commit-autoupdate(1), pre-commit-clean(1), pre-commit-gc(1), pre-commit-init-templatedir(1), pre-commit-install(1), pre-commit-install-hooks(1), pre-commit-migrate-config(1), pre-commit-run(1), pre-commit-sample-config(1), pre-commit-uninstall(1), pre-commit-validate-config(1), pre-commit-validate-manifest(1), pre-commit-help(1)
Referenced By
pre-commit(1), pre-commit-autoupdate(1), pre-commit-clean(1), pre-commit-gc(1), pre-commit-help(1), pre-commit-init-templatedir(1), pre-commit-install(1), pre-commit-install-hooks(1), pre-commit-migrate-config(1), pre-commit-run(1), pre-commit-sample-config(1), pre-commit-uninstall(1), pre-commit-validate-config(1), pre-commit-validate-manifest(1).