File tree 1 file changed +7
-5
lines changed
1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ git config branch.master.rebase true
42
42
# display of changes merged in the fast-forward operation.
43
43
git config rebase.stat true
44
44
45
+ gitDir=` git rev-parse --git-dir`
46
+
45
47
setup_user () {
46
48
read -ep " Please enter your full name, such as 'John Doe': " name
47
49
echo " Setting name to '$name '"
@@ -51,10 +53,11 @@ setup_user() {
51
53
git config user.email " $email "
52
54
}
53
55
56
+ # Copy hooks
57
+ echo cp hooks/commit-msg $gitDir /hooks
58
+ cp hooks/commit-msg $gitDir /hooks
59
+
54
60
if [ " $1 " == " copyOnly" ]; then
55
- # Copy hooks
56
- echo cp hooks/commit-msg .git/hooks
57
- cp hooks/commit-msg .git/hooks
58
61
exit 0
59
62
fi
60
63
83
86
fi
84
87
done
85
88
86
-
87
89
# Record the version of this setup so the developer can be notified that
88
90
# this script and/or hooks have been modified.
89
91
SetupForDevelopment_VERSION=1
90
- git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}
92
+ git config hooks.SetupForDevelopment ${SetupForDevelopment_VERSION}
You can’t perform that action at this time.
0 commit comments