mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Summary: prepare-commit-msg skip merges, -m flag, squash, template
Detail: prepare-commit-msg now is skipped if -m flag is supplied, if user has a template defined, if commit is a squash or a merge. BUG-ID : none Reviewed-by: Marcus Sorensen <marcus@betterservers.com> Reported-by: Marcus Sorensen <marcus@betterservers.com> Signed-off-by: Marcus Sorensen <marcus@betterservers.com> 1350600822 -0600
This commit is contained in:
parent
e61aa3aa74
commit
a3c9a2b22d
@ -35,7 +35,9 @@
|
|||||||
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
# SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p')
|
||||||
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
|
# grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1"
|
||||||
|
|
||||||
cat <<EOF > $1
|
run_generic_commit () {
|
||||||
|
local file=$1
|
||||||
|
cat <<EOF > $file
|
||||||
################################# 80 chars #####################################
|
################################# 80 chars #####################################
|
||||||
# The following is an example of how to fill out the above form. Please limit
|
# The following is an example of how to fill out the above form. Please limit
|
||||||
# your formatting to 80 cols.
|
# your formatting to 80 cols.
|
||||||
@ -60,5 +62,25 @@ Detail: \n\n\
|
|||||||
BUG-ID : \n\
|
BUG-ID : \n\
|
||||||
Reviewed-by: \n\
|
Reviewed-by: \n\
|
||||||
Reported-by: \n\
|
Reported-by: \n\
|
||||||
Signed-off-by: ${SOB}\n\n/" $1
|
Signed-off-by: ${SOB}\n\n/" $file
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$2,$3" in
|
||||||
|
merge,*)
|
||||||
|
;;
|
||||||
|
|
||||||
|
template,*)
|
||||||
|
;;
|
||||||
|
|
||||||
|
message,*)
|
||||||
|
;;
|
||||||
|
|
||||||
|
squash,*)
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
run_generic_commit $1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user