diff options
-rwxr-xr-x | scripts/create-pull-request | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 9ea28a1652..3f30cf1965 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request | |||
@@ -261,7 +261,13 @@ if [ -n "$BODY" ]; then | |||
261 | sed -i "/BLURB HERE/ d" "$CL" | 261 | sed -i "/BLURB HERE/ d" "$CL" |
262 | fi | 262 | fi |
263 | 263 | ||
264 | # If the user specified a subject, replace the SUBJECT token with it. | 264 | # Set subject automatically if there is only one patch |
265 | patch_cnt=`git log --pretty=oneline ${RELATIVE_TO}..${L_BRANCH} | wc -l` | ||
266 | if [ -z "$SUBJECT" -a $patch_cnt -eq 1 ]; then | ||
267 | SUBJECT="`git log --format=%s ${RELATIVE_TO}..${L_BRANCH}`" | ||
268 | fi | ||
269 | |||
270 | # Replace the SUBJECT token with it. | ||
265 | if [ -n "$SUBJECT" ]; then | 271 | if [ -n "$SUBJECT" ]; then |
266 | sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL" | 272 | sed -i -e "s/\*\*\* SUBJECT HERE \*\*\*/$SUBJECT/" "$CL" |
267 | fi | 273 | fi |