from typing import Callable
import click


def commit_message_option(default: str) -> Callable:
	"""
	Decorator to add the ``-m / --message`` option to a click command.

	.. versionadded:: 0.5.0

	:param default: The default commit message.
	"""

	return click.option(
			"-m",
			"--message",
			type=click.STRING,
			default=default,
			help="The commit message to use.",
			show_default=True,
			)