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 77{
88 echo " Usage: git gerrit init [-u <gerrit URL>] [-p <project name>]"
99 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] "
1111 echo " git gerrit new"
1212 exit
1313}
@@ -140,8 +140,8 @@ gerrit_submit()
140140 # Determine target branch
141141 target=$( get_upstream)
142142 reffor=for
143- unset topicspec
144- while getopts " b:dt:" OPTION
143+ unset topicspec commitargs
144+ while getopts " b:dt:q " OPTION
145145 do
146146 case $OPTION in
147147 b)
@@ -155,6 +155,10 @@ gerrit_submit()
155155 topicspec=/$OPTARG
156156 echo Submitting with topic: $OPTARG
157157 ;;
158+ q)
159+ commitargs=" $commitargs --no-edit"
160+ echo Will skip EDITOR for commit message
161+ ;;
158162 esac
159163 done
160164
222226 echo
223227 echo " Merge successful - please provide a meaningful commit message"
224228 echo
225- git commit
229+ git commit ${commitargs}
226230 git push gerrit HEAD:refs/${reffor} /${target}${topicspec}
227231
228232 # Save commit message for next time, and switch back to working branch
You can’t perform that action at this time.
0 commit comments