Sha256: adb79c2ee0a18d37989988bd3c4415ef2d49c6b930a78bb3121e94f141e29eac

Contents?: true

Size: 894 Bytes

Versions: 164

Compression:

Stored size: 894 Bytes

Contents

#!/bin/sh
#
# An example hook script to check the commit log message.
# Called by git-commit with one argument, the name of the file
# that has the commit message.  The hook should exit with non-zero
# status after issuing an appropriate message if it wants to stop the
# commit.  The hook is allowed to edit the commit message file.
#
# To enable this hook, rename this file to "commit-msg".

# Uncomment the below to add a Signed-off-by line to the message.
# Doing this in a hook is a bad idea in general, but the prepare-commit-msg
# hook is more suited to it.
#
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"

# This example catches duplicate Signed-off-by lines.

test "" = "$(grep '^Signed-off-by: ' "$1" |
	 sort | uniq -c | sed -e '/^[ 	]*1[ 	]/d')" || {
	echo >&2 Duplicate Signed-off-by lines.
	exit 1
}

Version data entries

164 entries across 135 versions & 21 rubygems

Version Path
ol-whisk_deploy-0.6.25 scenarios/git_repositories/config.git/hooks/commit-msg.sample
ol-whisk_deploy-0.6.25 scenarios/git_repositories/project.git/hooks/commit-msg.sample
ol-whisk_deploy-0.6.26 scenarios/git_repositories/project.git/hooks/commit-msg.sample
ol-whisk_deploy-0.6.26 scenarios/git_repositories/config.git/hooks/commit-msg.sample
karmi-markout-0.1.1 test/fixtures/empty_repository__dot__git/hooks/commit-msg.sample
karmi-markout-0.1.2 test/fixtures/empty_repository__dot__git/hooks/commit-msg.sample
karmi-markout-0.1.3 test/fixtures/empty_repository__dot__git/hooks/commit-msg.sample
whisk_deploy-0.6.26 scenarios/git_repositories/config.git/hooks/commit-msg.sample
whisk_deploy-0.6.26 scenarios/git_repositories/project.git/hooks/commit-msg.sample
whiskey_disk-0.6.24 scenarios/git_repositories/project.git/hooks/commit-msg.sample
whiskey_disk-0.6.24 scenarios/git_repositories/config.git/hooks/commit-msg.sample
whiskey_disk-0.6.23 scenarios/git_repositories/project.git/hooks/commit-msg.sample
whiskey_disk-0.6.23 scenarios/git_repositories/config.git/hooks/commit-msg.sample
closest_fib_gem-0.1.0 .git-old/hooks/commit-msg.sample
winci-updater-0.0.3 spec/fixtures/files.git/hooks/commit-msg.sample
winci-updater-0.0.3 features/fixtures/files.git/hooks/commit-msg.sample
winci-updater-0.0.3 spec/fixtures/files_changed.git/hooks/commit-msg.sample
winci-updater-0.0.2 features/fixtures/files.git/hooks/commit-msg.sample
winci-updater-0.0.2 spec/fixtures/files_changed.git/hooks/commit-msg.sample
winci-updater-0.0.2 spec/fixtures/files.git/hooks/commit-msg.sample