diff options
Diffstat (limited to 'scripts/create-pull-request')
-rwxr-xr-x | scripts/create-pull-request | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/create-pull-request b/scripts/create-pull-request index 600fa7a341..9a8913db72 100755 --- a/scripts/create-pull-request +++ b/scripts/create-pull-request | |||
@@ -34,8 +34,8 @@ RFC=0 | |||
34 | usage() { | 34 | usage() { |
35 | CMD=$(basename $0) | 35 | CMD=$(basename $0) |
36 | cat <<EOM | 36 | cat <<EOM |
37 | Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote -b branch | 37 | Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] -u remote [-b branch] |
38 | -b branch Branch name in the specified remote | 38 | -b branch Branch name in the specified remote (default: current branch) |
39 | -c Create an RFC (Request for Comment) patch series | 39 | -c Create an RFC (Request for Comment) patch series |
40 | -h Display this help message | 40 | -h Display this help message |
41 | -i commit_id Ending commit (default: HEAD) | 41 | -i commit_id Ending commit (default: HEAD) |
@@ -120,7 +120,12 @@ while getopts "b:chi:m:o:p:r:s:u:" OPT; do | |||
120 | esac | 120 | esac |
121 | done | 121 | done |
122 | 122 | ||
123 | if [ -z "$BRANCH" ] || [ -z "$REMOTE_URL" ]; then | 123 | if [ -z "$BRANCH" ]; then |
124 | BRANCH=$(git branch | grep -e "^\* " | cut -d' ' -f2) | ||
125 | echo "NOTE: Assuming remote branch '$BRANCH', use -b to override." | ||
126 | fi | ||
127 | |||
128 | if [ -z "$REMOTE_URL" ]; then | ||
124 | usage | 129 | usage |
125 | exit 1 | 130 | exit 1 |
126 | fi | 131 | fi |