Correct prepare-commit-msg for Git Amends

Corrected the grep to properly identify the 'tested on' string, and
prevent it's inclusion if present.

The 'tested on' string should still be included if the amendment is made
on a later date.

Tested-on: arcturus <09 Jan 2014>
This commit is contained in:
Tom Swartz
2014-01-09 13:35:09 -05:00
parent c98770ebcc
commit 5d30163779

View File

@@ -14,4 +14,4 @@
DATE=$(date +"%d %b %Y")
HOSTNAME=$HOSTNAME
TestedMSG="Tested-on: $HOSTNAME <$DATE>"
grep -qs "^TestedMSG" "$1" || echo "$TestedMSG" >> "$1"
grep -qs "$TestedMSG" "$1" || echo "$TestedMSG" >> "$1"