From dc7578c72c586d4d620ea2f93bf129c24cf57312 Mon Sep 17 00:00:00 2001 From: Marcus Sorensen Date: Wed, 6 Feb 2013 10:11:12 -0700 Subject: [PATCH] Summary: Make prepare-commit-msg hook more compatible with operating systems Detail: Was using sed -i, which breaks on Mac Signed-off-by: Marcus Sorensen 1360170672 -0700 --- tools/git/prepare-commit-msg | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/tools/git/prepare-commit-msg b/tools/git/prepare-commit-msg index af8964b4b28..33470193a31 100755 --- a/tools/git/prepare-commit-msg +++ b/tools/git/prepare-commit-msg @@ -54,8 +54,18 @@ run_generic_commit () { local file=$1 +SOB=$(git var GIT_AUTHOR_IDENT) cat < $file ################################# 80 chars ##################################### +Summary: +Detail: + +BUG-ID: +Bugfix-for: +Reviewed-by: +Reported-by: +Signed-off-by: ${SOB} +################################# 80 chars ##################################### # The following is an example of how to fill out the above form. Please limit # your formatting to 80 cols. # @@ -71,18 +81,6 @@ cat < $file # $ORIGINAL EOF - -SOB=$(git var GIT_AUTHOR_IDENT) - -sed -i "1s/^/################################# 80 chars #####################################\n\ -Summary: \n\n\ -Detail: \n\n\ -BUG-ID: \n\ -Bugfix-for: \n\ -Reviewed-by: \n\ -Reported-by: \n\ -Signed-off-by: ${SOB}\n\n/" $file - } case "$2,$3" in