summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2015-02-10 20:36:19 -0700
committerCraig Earls <enderw88@gmail.com>2015-02-10 20:36:19 -0700
commit3872eed477209ea3333b1252db557a5aa88911ac (patch)
treec11029a21e37cc5f0e947d0c84007486d91ee61a
parent6b668974a48daa9982470295adb7fe3c1c7dd990 (diff)
parentc397f6f53af170598872ec4620f1356d8bbcdea7 (diff)
downloadfork-ledger-3872eed477209ea3333b1252db557a5aa88911ac.tar.gz
fork-ledger-3872eed477209ea3333b1252db557a5aa88911ac.tar.bz2
fork-ledger-3872eed477209ea3333b1252db557a5aa88911ac.zip
Merge pull request #387 from thdox/pre-commit
prepare-commit-msg fix
-rwxr-xr-xtools/prepare-commit-msg6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/prepare-commit-msg b/tools/prepare-commit-msg
index ab351760..d2f927c0 100755
--- a/tools/prepare-commit-msg
+++ b/tools/prepare-commit-msg
@@ -5,17 +5,17 @@
# Add [ci skip] to the commit message unless there are changes to files
# that are relevant for testing such as src/*, test/*, ledger3.texi, ...
-function add_ci_skip()
+add_ci_skip ()
{
pattern="$1"; shift
source="$1"
# Don't add [ci skip] if it's already in the commit message source
- grep '\[ci skip\]' "$source" 2>&1 >/dev/null
+ grep '\[ci skip\]' "$source" >/dev/null 2>&1
[ $? -eq 0 ] && return
if [ $(git diff --cached --name-only | grep --count "$pattern") -eq 0 ]; then
- tempfile=$(mktemp $0.XXXXXX)
+ tempfile=$(mktemp "${0}.XXXXXX")
cat - "$1" <<EOF > "$tempfile"
# It seems the changes to be committed are irrelevant for the continuous