File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,14 @@ function inject_hooks() {
5151 $NOOP $GIT -C $repo config gitflow.hotfix.finish.message " Hotfix %tag%"
5252 $NOOP $GIT -C $repo config gitflow.release.finish.message " Release %tag%"
5353
54+ if [[ -z $( $GIT -C $repo config --get gitflow.branch.allow-master-commit) ]]; then
55+ $NOOP $GIT -C $repo config gitflow.branch.allow-master-commit false
56+ fi
57+
58+ if [[ -z $( $GIT -C $repo config --get gitflow.branch.allow-conflict-commit) ]]; then
59+ $NOOP $GIT -C $repo config gitflow.branch.allow-conflict-commit false
60+ fi
61+
5462 # 3/ find language
5563 if [[ -e $repo /package.json ]]; then
5664 language=" node"
@@ -170,4 +178,4 @@ function main() {
170178 inject_hooks " $1 " || die " $ERROR "
171179}
172180
173- main " $@ "
181+ main " $@ "
Original file line number Diff line number Diff line change @@ -59,6 +59,20 @@ if ($PSCmdlet.ShouldProcess("gitflow", "Configure Messages")) {
5959 Write-Error " git flow Release Finish Message configuration failed"
6060 exit 1
6161 }
62+ if ( (git - C $Path config -- get gitflow.branch.allow- master- commit) == " " ) {
63+ git - C $Path config -- bool gitflow.branch.allow- master- commit false
64+ if ( $LASTEXITCODE -ne 0 ) {
65+ Write-Error " git flow Allow Master Commit configuration failed"
66+ exit 1
67+ }
68+ }
69+ if ( (git - C $Path config -- get gitflow.branch.allow- config- commit) == " " ) {
70+ git - C $Path config -- bool gitflow.branch.allow- config- commit false
71+ if ( $LASTEXITCODE -ne 0 ) {
72+ Write-Error " git flow Allow Conflict Commit configuration failed"
73+ exit 1
74+ }
75+ }
6276}
6377
6478# 3/ copy hooks
You can’t perform that action at this time.
0 commit comments