Expose prepare-commit-msg arguments as environment vars

This commit is contained in:
Matt Whitaker
2022-05-27 17:03:21 +01:00
committed by Anthony Sottile
parent 44cb80f74a
commit 702ebf402c
6 changed files with 87 additions and 2 deletions

View File

@@ -107,6 +107,20 @@ def _add_run_options(parser: argparse.ArgumentParser) -> None:
'--commit-msg-filename',
help='Filename to check when running during `commit-msg`',
)
parser.add_argument(
'--prepare-commit-message-source',
help=(
'Source of the commit message '
'(typically the second argument to .git/hooks/prepare-commit-msg)'
),
)
parser.add_argument(
'--commit-object-name',
help=(
'Commit object name '
'(typically the third argument to .git/hooks/prepare-commit-msg)'
),
)
parser.add_argument(
'--remote-name', help='Remote name used by `git push`.',
)