File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,14 @@ function main() {
65
65
commitMessage=" ${commitMessage}${commitDescription} "
66
66
printf " \r"
67
67
68
+ clear
68
69
git commit -m " ${commitMessage} "
69
70
git log -n 1
70
- gstatus
71
+ git status
71
72
72
73
echo
73
- __print_info " To add body, footer or edit the commit message, use "
74
- __println_as magenta " git commit --amend"
74
+ __print_info " To add the commit body/ footer or edit the commit message, use "
75
+ __println_as magenta " $ git commit --amend"
75
76
echo
76
77
}
77
78
@@ -126,7 +127,10 @@ function get_commit_scope() {
126
127
--info=hidden\
127
128
--bind ' enter:print-query' \
128
129
--header " ${GCOMMIT_SCOPE_HEADER} " ) "
129
- [ -n " ${commitScope} " ] && echo " ${commitScope} " >> " ${commitScopeFile} "
130
+ # check if the new scope is already present
131
+ [ -n " ${commitScope} " ] \
132
+ && ! grep -Fxq " ${commitScope} " " ${commitScopeFile} " \
133
+ && echo " ${commitScope} " >> " ${commitScopeFile} "
130
134
fi
131
135
echo " ${commitScope} "
132
136
}
You can’t perform that action at this time.
0 commit comments