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() {
51
51
$NOOP $GIT -C $repo config gitflow.hotfix.finish.message " Hotfix %tag%"
52
52
$NOOP $GIT -C $repo config gitflow.release.finish.message " Release %tag%"
53
53
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
+
54
62
# 3/ find language
55
63
if [[ -e $repo /package.json ]]; then
56
64
language=" node"
@@ -170,4 +178,4 @@ function main() {
170
178
inject_hooks " $1 " || die " $ERROR "
171
179
}
172
180
173
- main " $@ "
181
+ main " $@ "
Original file line number Diff line number Diff line change @@ -59,6 +59,20 @@ if ($PSCmdlet.ShouldProcess("gitflow", "Configure Messages")) {
59
59
Write-Error " git flow Release Finish Message configuration failed"
60
60
exit 1
61
61
}
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
+ }
62
76
}
63
77
64
78
# 3/ copy hooks
You can’t perform that action at this time.
0 commit comments