cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mlsoren...@apache.org
Subject [1/2] git commit: refs/heads/4.1 - Summary: Make prepare-commit-msg hook more compatible with operating systems
Date Wed, 06 Feb 2013 17:23:45 GMT
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 <marcus@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/dc0ef3ce
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/dc0ef3ce
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/dc0ef3ce

Branch: refs/heads/4.1
Commit: dc0ef3cef7634e46e279592281da463f4351d8c1
Parents: 73bb179
Author: Marcus Sorensen <marcus@betterservers.com>
Authored: Wed Feb 6 10:11:12 2013 -0700
Committer: Marcus Sorensen <marcus@betterservers.com>
Committed: Wed Feb 6 10:24:10 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/dc0ef3ce/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


Mime
View raw message