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>
Laura Abbott committed
Dec 12, 2018 at 14:32 UTC
1eadaa3978fb8f9e9d062379fc95a65fb5ff6f8b
2 files changed
+9
-2
Documentation/git-quiltimport.txt
+4
-1
@@ -10,7 +10,7 @@ SYNOPSIS
10
--------
11
[verse]
12
'git quiltimport' [--dry-run | -n] [--author <author>] [--patches <dir>]
13
- [--series <file>]
13
+ [--series <file>] [--keep-non-patch]
14
15
16
DESCRIPTION
@@ -56,6 +56,9 @@ The default for the series file is <patches>/series
56
or the value of the `$QUILT_SERIES` environment
57
variable.
58
59
+--keep-non-patch::
60
+ Pass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).
61
+
62
GIT
63
---
64
Part of the linkgit:git[1] suite
git-quiltimport.sh
+5
-1
@@ -8,6 +8,7 @@ n,dry-run dry run
8
author= author name and email address for patches without any
9
patches= path to the quilt patches
10
series= path to the quilt series file
11
+keep-non-patch Pass -b to git mailinfo
12
"
13
SUBDIRECTORY_ON=Yes
14
. git-sh-setup
@@ -32,6 +33,9 @@ do
33
shift
34
QUILT_SERIES="$1"
35
;;
36
+ --keep-non-patch)
37
+ MAILINFO_OPT="-b"
38
+ ;;
39
--)
40
shift
41
break;;
@@ -98,7 +102,7 @@ do
102
continue
103
fi
104
echo $patch_name
101
- git mailinfo "$tmp_msg" "$tmp_patch" \
105
+ git mailinfo $MAILINFO_OPT "$tmp_msg" "$tmp_patch" \
106
<"$QUILT_PATCHES/$patch_name" >"$tmp_info" || exit 3
107
test -s "$tmp_patch" || {
108
echo "Patch is empty. Was it split wrong?"