projects
/
hvutilities.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hvsp: fix error with slashes in subject line
[hvutilities.git]
/
scripts
/
kernel-send-patches.sh
diff --git
a/scripts/kernel-send-patches.sh
b/scripts/kernel-send-patches.sh
index
ebbc3d4
..
4e7688f
100755
(executable)
--- a/
scripts/kernel-send-patches.sh
+++ b/
scripts/kernel-send-patches.sh
@@
-44,6
+44,7
@@
TO_CMD="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats -
CC_CMD="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --non --nom"
# Set default values
CC_CMD="`pwd`/scripts/get_maintainer.pl --nogit --nogit-fallback --norolestats --non --nom"
# Set default values
+debug="0"
commit_start=""
commit_end=""
DRY_RUN="--dry-run"
commit_start=""
commit_end=""
DRY_RUN="--dry-run"
@@
-55,6
+56,7
@@
cover="no"
series=""
resend="no"
GIT_FORMAT_PATCH_SUBJECT="PATCH"
series=""
resend="no"
GIT_FORMAT_PATCH_SUBJECT="PATCH"
+GIT_FORMAT_PATCH_OPTS="--histogram"
skip_compile=0
CHECKPATCH_OPS="--strict"
skip_compile=0
CHECKPATCH_OPS="--strict"
@@
-64,20
+66,21
@@
print_usage()
echo "Usage: ${PROG_NAME} [OPTIONS...]"
echo
echo "Options:"
echo "Usage: ${PROG_NAME} [OPTIONS...]"
echo
echo "Options:"
- echo " -d
resend patch
"
+ echo " -d
debug mode
"
echo " -e end commit (string)"
echo " -f folder containing patch infos"
echo " -h display this help and exit"
echo " -n dot not compile patches"
echo " -e end commit (string)"
echo " -f folder containing patch infos"
echo " -h display this help and exit"
echo " -n dot not compile patches"
+ echo " -p resend patch"
echo " -r really send emails (default = dry-run)"
echo " -s start commit (string)"
echo
}
echo " -r really send emails (default = dry-run)"
echo " -s start commit (string)"
echo
}
-while getopts "de:f:hnrs:" flag ;do
+while getopts "de:f:hn
p
rs:" flag ;do
case ${flag} in
d)
case ${flag} in
d)
-
resend="yes
"
+
debug="1
"
;;
e)
commit_end="${OPTARG}"
;;
e)
commit_end="${OPTARG}"
@@
-92,6
+95,9
@@
while getopts "de:f:hnrs:" flag ;do
n)
skip_compile=1
;;
n)
skip_compile=1
;;
+ p)
+ resend="yes"
+ ;;
r)
DRY_RUN=""
;;
r)
DRY_RUN=""
;;
@@
-280,7
+286,12
@@
if [ x"${orig_branch}" = x"" ]; then
fi
if git branch | grep -q ${patches_branch}; then
fi
if git branch | grep -q ${patches_branch}; then
- git branch -D ${patches_branch}
+ git branch -D ${patches_branch} 1>/dev/null
+fi
+
+if [ "${debug}" = "1" ]; then
+ echo "start commit: ${COMMIT_START_SHA1}"
+ echo "end commit: ${COMMIT_END_SHA1}"
fi
# Create new branch from base_branch, and apply all our patches onto it:
fi
# Create new branch from base_branch, and apply all our patches onto it:
@@
-288,7
+299,7
@@
git checkout -b ${patches_branch} ${base_branch}
git branch --set-upstream-to ${base_branch}
git cherry-pick ${COMMIT_START_SHA1}..${COMMIT_END_SHA1}
git branch --set-upstream-to ${base_branch}
git cherry-pick ${COMMIT_START_SHA1}..${COMMIT_END_SHA1}
-GIT_FORMAT_PATCH_OPTS="--base=${base_commit}"
+GIT_FORMAT_PATCH_OPTS="
${GIT_FORMAT_PATCH_OPTS}
--base=${base_commit}"
if [ x"${cover}" = x"yes" ]; then
GIT_FORMAT_PATCH_OPTS="${GIT_FORMAT_PATCH_OPTS} --cover-letter"
if [ x"${cover}" = x"yes" ]; then
GIT_FORMAT_PATCH_OPTS="${GIT_FORMAT_PATCH_OPTS} --cover-letter"
@@
-309,7
+320,7
@@
git format-patch --subject-prefix="${GIT_FORMAT_PATCH_SUBJECT}" \
if [ x"${cover}" = x"yes" ]; then
# Replace subject line in cover letter:
if [ x"${cover}" = x"yes" ]; then
# Replace subject line in cover letter:
- sed -i -e "s
/\*\*\* SUB.*/${subject}/
" ${srcdir}/${series_prefix}0000-cover-letter.patch
+ sed -i -e "s
@\*\*\* SUB.*@${subject}@
" ${srcdir}/${series_prefix}0000-cover-letter.patch
# Replace blurb line in cover letter:
sed -i -e "/.*BLURB.*/{r /tmp/cover-letter.txt" -e 'd}' ${srcdir}/${series_prefix}0000-cover-letter.patch
# Replace blurb line in cover letter:
sed -i -e "/.*BLURB.*/{r /tmp/cover-letter.txt" -e 'd}' ${srcdir}/${series_prefix}0000-cover-letter.patch
@@
-360,9
+371,6
@@
EOF
git checkout -b ${temp_compile_branch} ${compile_branch}
git checkout -b ${temp_compile_branch} ${compile_branch}
- # Make sure temp_compile_branch is rebased on base_branch:
- git rebase ${base_branch}
-
# Apply all of our commits to temp_compile_branch:
git cherry-pick ${COMMIT_START_SHA1}..${COMMIT_END_SHA1}
# Apply all of our commits to temp_compile_branch:
git cherry-pick ${COMMIT_START_SHA1}..${COMMIT_END_SHA1}