1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-04 06:36:35 +02:00

git-quiltimport: add --keep-non-patch option

git-am has the --keep-non-patch option to pass -b to
git-mailinfo for keeping subject prefixes intact. Allow
this option to be used with quiltimport as well.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Laura Abbott 2018-12-12 14:32:27 -08:00 committed by Junio C Hamano
parent 5d826e9729
commit 1eadaa3978
2 changed files with 9 additions and 2 deletions

View File

@ -10,7 +10,7 @@ SYNOPSIS
-------- --------
[verse] [verse]
'git quiltimport' [--dry-run | -n] [--author <author>] [--patches <dir>] 'git quiltimport' [--dry-run | -n] [--author <author>] [--patches <dir>]
[--series <file>] [--series <file>] [--keep-non-patch]
DESCRIPTION DESCRIPTION
@ -56,6 +56,9 @@ The default for the series file is <patches>/series
or the value of the `$QUILT_SERIES` environment or the value of the `$QUILT_SERIES` environment
variable. variable.
--keep-non-patch::
Pass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
GIT GIT
--- ---
Part of the linkgit:git[1] suite Part of the linkgit:git[1] suite

View File

@ -8,6 +8,7 @@ n,dry-run dry run
author= author name and email address for patches without any author= author name and email address for patches without any
patches= path to the quilt patches patches= path to the quilt patches
series= path to the quilt series file series= path to the quilt series file
keep-non-patch Pass -b to git mailinfo
" "
SUBDIRECTORY_ON=Yes SUBDIRECTORY_ON=Yes
. git-sh-setup . git-sh-setup
@ -32,6 +33,9 @@ do
shift shift
QUILT_SERIES="$1" QUILT_SERIES="$1"
;; ;;
--keep-non-patch)
MAILINFO_OPT="-b"
;;
--) --)
shift shift
break;; break;;
@ -98,7 +102,7 @@ do
continue continue
fi fi
echo $patch_name echo $patch_name
git mailinfo "$tmp_msg" "$tmp_patch" \ git mailinfo $MAILINFO_OPT "$tmp_msg" "$tmp_patch" \
<"$QUILT_PATCHES/$patch_name" >"$tmp_info" || exit 3 <"$QUILT_PATCHES/$patch_name" >"$tmp_info" || exit 3
test -s "$tmp_patch" || { test -s "$tmp_patch" || {
echo "Patch is empty. Was it split wrong?" echo "Patch is empty. Was it split wrong?"