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 7
7
{
8
8
echo " Usage: git gerrit init [-u <gerrit URL>] [-p <project name>]"
9
9
echo " git gerrit update [-b <target branch>]"
10
- echo " git gerrit submit [-b <target branch>] [-d] [-t topic]"
10
+ echo " git gerrit submit [-b <target branch>] [-d] [-t topic] [-q] "
11
11
echo " git gerrit new"
12
12
exit
13
13
}
@@ -140,8 +140,8 @@ gerrit_submit()
140
140
# Determine target branch
141
141
target=$( get_upstream)
142
142
reffor=for
143
- unset topicspec
144
- while getopts " b:dt:" OPTION
143
+ unset topicspec commitargs
144
+ while getopts " b:dt:q " OPTION
145
145
do
146
146
case $OPTION in
147
147
b)
@@ -155,6 +155,10 @@ gerrit_submit()
155
155
topicspec=/$OPTARG
156
156
echo Submitting with topic: $OPTARG
157
157
;;
158
+ q)
159
+ commitargs=" $commitargs --no-edit"
160
+ echo Will skip EDITOR for commit message
161
+ ;;
158
162
esac
159
163
done
160
164
222
226
echo
223
227
echo " Merge successful - please provide a meaningful commit message"
224
228
echo
225
- git commit
229
+ git commit ${commitargs}
226
230
git push gerrit HEAD:refs/${reffor} /${target}${topicspec}
227
231
228
232
# Save commit message for next time, and switch back to working branch
You can’t perform that action at this time.
0 commit comments