Lines Matching +full:hi +full:- +full:fi
3 # Copyright (c) 2010-2013, Intel Corporation.
5 # SPDX-License-Identifier: GPL-2.0-or-later
15 ODIR=pull-$$
24 …: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d re…
25 -b branch Branch name in the specified remote (default: current branch)
26 -l local branch Local branch name (default: HEAD)
27 -c Create an RFC (Request for Comment) patch series
28 -h Display this help message
29 -a Automatically push local branch (-l) to remote branch (-b),
31 -i commit_id Ending commit (default: HEAD)
32 -m msg_body_file The file containing a blurb to be inserted into the summary email
33 -o output_dir Specify the output directory for the messages (default: pull-PID)
34 -p prefix Use [prefix N/M] instead of [PATCH N/M] as the subject prefix
35 -r relative_to Starting commit (default: master)
36 -s subject The subject to be inserted into the summary email
37 -u remote The git remote where the branch is located, or set CPR_CONTRIB_REMOTE in env
38 -d relative_dir Generate patches relative to directory
41 $CMD -u contrib -b nitin/basic
42 $CMD -u contrib -r distro/master -i nitin/distro -b nitin/distro
43 $CMD -u contrib -r distro/master -i nitin/distro -b nitin/distro -l distro
44 $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc
45 $CMD -u contrib -p "RFC PATCH" -b nitin/experimental
46 $CMD -u contrib -i misc -b nitin/misc -d ./bitbake
47 …$CMD -u contrib -r origin/master -o /tmp/out.v3 -- -v3 --in-reply-to=20170511120134.XX7799@site.com
53 while getopts "b:acd:hi:m:o:p:r:s:u:l:" OPT; do
76 if [ ! -e "$BODY" ]; then
79 fi
99 --)
106 shift "$((OPTIND - 1))"
109 if [ -z "$REMOTE" ]; then
110 echo "ERROR: Missing parameter -u or CPR_CONTRIB_REMOTE in env, no git remote!"
113 fi
116 if [ $? -ne 0 ]; then
122 fi
126 USER_RE="[A-Za-z0-9_.@][A-Za-z0-9_.@-]*\$\?"
127 PROTO_RE="[a-z][a-z+]*://"
133 if [ -z "$BRANCH" ]; then
134 BRANCH=$(git branch | grep -e "^\* " | cut -d' ' -f2)
135 echo "NOTE: Assuming remote branch '$BRANCH', use -b to override."
136 fi
138 if [ -z "$L_BRANCH" ]; then
140 echo "NOTE: Assuming local branch HEAD, use -l to override."
141 fi
143 if [ $RFC -eq 1 ]; then
145 fi
167 if [ -n "$WEB_URL" ]; then
172 fi
173 wget --no-check-certificate -q $WEB_URL -O /dev/null
174 if [ $? -ne 0 ]; then
178 fi
179 fi
181 if [ -e $ODIR ]; then
184 fi
187 if [ -n "$RELDIR" ]; then
191 extraopts="$extraopts --relative"
192 fi
195 git format-patch $extraopts -M40 --subject-prefix="$PREFIX" -n -o $ODIR --thread=shallow --cover-le…
197 if [ -z "$(ls -A $ODIR 2> /dev/null)" ]; then
203 fi
205 [ -n "$RELDIR" ] && cd $pdir
208 CL="$(echo $ODIR/*0000-cover-letter.patch)"
209 PM="$ODIR/pull-msg"
210 GIT_VERSION=$(`git --version` | tr -d '[:alpha:][:space:].' | sed 's/\(...\).*/\1/')
212 if [ $GIT_VERSION -lt $NEWER_GIT_VERSION ]; then
213 git request-pull $RELATIVE_TO $REMOTE_URL $COMMIT_ID >> "$PM"
215 git request-pull $RELATIVE_TO $REMOTE_URL $L_BRANCH:$BRANCH >> "$PM"
216 fi
217 if [ $? -ne 0 ]; then
218 echo "ERROR: git request-pull reported an error"
219 rm -rf $ODIR
221 fi
223 # The cover letter already has a diffstat, remove it from the pull-msg
225 sed -n "0,\#$REMOTE_URL# p" "$PM" | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
229 if [ $RFC -eq 1 ]; then
233 you agree with the changes, please provide your Acked-by.
236 ) | sed -i "/BLURB HERE/ r /dev/stdin" "$CL"
237 fi
240 if [ -n "$WEB_URL" ]; then
241 echo " $WEB_URL" | sed -i "\#$REMOTE_URL# r /dev/stdin" "$CL"
242 fi
247 if [ -n "$BODY" ]; then
248 sed -i "/BLURB HERE/ r $BODY" "$CL"
249 sed -i "/BLURB HERE/ d" "$CL"
250 fi
253 patch_cnt=`git log --pretty=oneline ${RELATIVE_TO}..${L_BRANCH} | wc -l`
254 if [ -z "$SUBJECT" -a $patch_cnt -eq 1 ]; then
255 SUBJECT="`git log --format=%s ${RELATIVE_TO}..${L_BRANCH}`"
256 fi
259 if [ -n "$SUBJECT" ]; then
260 sed -i -e "s\`\*\*\* SUBJECT HERE \*\*\*\`$SUBJECT\`" "$CL"
261 fi
273 send-pull-request -a -p $ODIR
277 egrep -q -e "^\+.*\s+$" $ODIR/*
278 if [ $? -ne 1 ]; then
281 egrep -nH --color -e "^\+.*\s+$" $ODIR/*
282 fi