summaryrefslogtreecommitdiff
path: root/Documentation/git-hooks-commit-msg
diff options
context:
space:
mode:
authorTheo Chatzimichos <tampakrap@gentoo.org>2011-08-01 14:12:20 +0300
committerTheo Chatzimichos <tampakrap@gentoo.org>2011-08-01 14:12:20 +0300
commitaaddd843c34fc43bfe0bde780dedfb27ec260717 (patch)
tree9cbee06765c945252a3c975199e204ef96817155 /Documentation/git-hooks-commit-msg
parent6eddd3008e75192bf2b01daa13c2561865287753 (diff)
downloadkde-aaddd843c34fc43bfe0bde780dedfb27ec260717.tar.gz
kde-aaddd843c34fc43bfe0bde780dedfb27ec260717.tar.bz2
kde-aaddd843c34fc43bfe0bde780dedfb27ec260717.zip
Move scripts into the maintainers dir
Diffstat (limited to 'Documentation/git-hooks-commit-msg')
-rwxr-xr-xDocumentation/git-hooks-commit-msg33
1 files changed, 0 insertions, 33 deletions
diff --git a/Documentation/git-hooks-commit-msg b/Documentation/git-hooks-commit-msg
deleted file mode 100755
index 374b6cd7d53..00000000000
--- a/Documentation/git-hooks-commit-msg
+++ /dev/null
@@ -1,33 +0,0 @@
-#!/bin/bash
-#
-# To enable this hook, link it into .git/hooks/commit-msg like this:
-# ln -s ../../Documentation/git-hooks-commit-msg .git/hooks/commit-msg
-
-FILE=$1
-
-die() {
- echo "Aborting commit: $1"
- echo "(Your message was saved in $FILE)"
- exit 1
-}
-
-summary=`head -n1 "$FILE"`
-
-### Enforce first-line summary ###
-if [[ -z `grep '^\[[^]]\+\]' <<< "$summary"` ]] ; then
- die 'Summary (first line) should start with [changed path]'
-fi
-
-### Enforce usage of repoman ###
-if [[ -n `grep -e '^\[Documentation' <<< "$summary"` ]] ; then
- # Do not enforce usage of repoman where it makes no sense
- exit 0
-elif grep '^NO_REPOMAN' "$FILE" >& /dev/null ; then
- # Allow i-know-what-i-am-doing override
- sed -i -e '/^NO_REPOMAN/d' "$FILE"
- exit 0
-elif ! grep '^(Portage version' "$FILE" >& /dev/null ; then
- die 'Please use repoman to commit'
-fi
-
-exit 0