You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ml...@apache.org on 2013/02/06 18:12:12 UTC
git commit: refs/heads/master - Summary: Make prepare-commit-msg hook
more compatible with operating systems
Updated Branches:
refs/heads/master b28f3addf -> dc7578c72
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 <ma...@betterservers.com> 1360170672 -0700
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/dc7578c7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/dc7578c7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/dc7578c7
Branch: refs/heads/master
Commit: dc7578c72c586d4d620ea2f93bf129c24cf57312
Parents: b28f3ad
Author: Marcus Sorensen <ma...@betterservers.com>
Authored: Wed Feb 6 10:11:12 2013 -0700
Committer: Marcus Sorensen <ma...@betterservers.com>
Committed: Wed Feb 6 10:11:12 2013 -0700
----------------------------------------------------------------------
tools/git/prepare-commit-msg | 22 ++++++++++------------
1 files changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/dc7578c7/tools/git/prepare-commit-msg
----------------------------------------------------------------------
diff --git a/tools/git/prepare-commit-msg b/tools/git/prepare-commit-msg
index af8964b..3347019 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 <<EOF > $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 <<EOF > $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