{"thread":{"id":"50021","subject":"[PATCH] git-quiltimport: Add --keep-non-patch option","startedAt":"2018-12-12T22:32:45Z","lastAt":"2018-12-12T22:32:45Z","messageCount":1,"participants":["Laura Abbott"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"365206","messageId":"20181212223227.4024-1-labbott@redhat.com","threadId":"50021","inReplyTo":null,"subject":"[PATCH] git-quiltimport: Add --keep-non-patch option","fromName":"Laura Abbott","fromEmail":"labbott@redhat.com","sentAt":"2018-12-12T22:32:27Z","receivedAt":"2018-12-12T22:32:45Z","isPatch":true,"sender":{"key":"labbott@redhat.com","avatar":null},"body":"git-am has the --keep-non-patch option to pass -b to\ngit-mailinfo for keeping subject prefixes intact. Allow\nthis option to be used with quiltimport as well.\n\nSigned-off-by: Laura Abbott <labbott@redhat.com>\n---\n Documentation/git-quiltimport.txt | 5 ++++-\n git-quiltimport.sh                | 6 +++++-\n 2 files changed, 9 insertions(+), 2 deletions(-)\n\ndiff --git a/Documentation/git-quiltimport.txt b/Documentation/git-quiltimport.txt\nindex 8cf952b4d..70562dc4c 100644\n--- a/Documentation/git-quiltimport.txt\n+++ b/Documentation/git-quiltimport.txt\n@@ -10,7 +10,7 @@ SYNOPSIS\n --------\n [verse]\n 'git quiltimport' [--dry-run | -n] [--author <author>] [--patches <dir>]\n-\t\t[--series <file>]\n+\t\t[--series <file>] [--keep-non-patch]\n \n \n DESCRIPTION\n@@ -56,6 +56,9 @@ The default for the series file is <patches>/series\n or the value of the `$QUILT_SERIES` environment\n variable.\n \n+--keep-non-patch::\n+\tPass `-b` flag to 'git mailinfo' (see linkgit:git-mailinfo[1]).\n+\n GIT\n ---\n Part of the linkgit:git[1] suite\ndiff --git a/git-quiltimport.sh b/git-quiltimport.sh\nindex 6d3a88dec..e3d390974 100755\n--- a/git-quiltimport.sh\n+++ b/git-quiltimport.sh\n@@ -8,6 +8,7 @@ n,dry-run     dry run\n author=       author name and email address for patches without any\n patches=      path to the quilt patches\n series=       path to the quilt series file\n+keep-non-patch Pass -b to git mailinfo\n \"\n SUBDIRECTORY_ON=Yes\n . git-sh-setup\n@@ -32,6 +33,9 @@ do\n \t\tshift\n \t\tQUILT_SERIES=\"$1\"\n \t\t;;\n+\t--keep-non-patch)\n+\t\tMAILINFO_OPT=\"-b\"\n+\t\t;;\n \t--)\n \t\tshift\n \t\tbreak;;\n@@ -98,7 +102,7 @@ do\n \t\tcontinue\n \tfi\n \techo $patch_name\n-\tgit mailinfo \"$tmp_msg\" \"$tmp_patch\" \\\n+\tgit mailinfo $MAILINFO_OPT \"$tmp_msg\" \"$tmp_patch\" \\\n \t\t<\"$QUILT_PATCHES/$patch_name\" >\"$tmp_info\" || exit 3\n \ttest -s \"$tmp_patch\" || {\n \t\techo \"Patch is empty.  Was it split wrong?\"\n-- \n2.19.1\n\n"}]}