<div dir="ltr">Looks like the earlier version of this with the wrong -z vs -n got merged, please submit a follow-up patch to fix it.<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Apr 5, 2017 at 12:38 PM, Jose Lamego <span dir="ltr">&lt;<a href="mailto:jose.a.lamego@linux.intel.com" target="_blank">jose.a.lamego@linux.intel.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The create-pull-request script creates patches as replies to a cover<br>
<span class="">letter, in the form of an email thread. If further revisions are sent to<br>
the mailing list without referencing to the first revision, these new<br>
revisions are not identified at the mailing list as part of the original<br>
thread, but as a new thread instead.<br>
<br>
This change adds the &quot;[-t in_reply_to]&quot; option, where &quot;in_reply_to&quot; is<br>
the original cover letter&#39;s Message-Id, so this reference is added<br>
to the new cover letter to ensure the thread continuity.<br>
<br>
[YOCTO #11294]<br>
<br>
Signed-off-by: Jose Lamego &lt;<a href="mailto:jose.a.lamego@linux.intel.com">jose.a.lamego@linux.intel.com</a><wbr>&gt;<br>
---<br>
</span> scripts/create-pull-request | 17 +++++++++++++----<br>
 1 file changed, 13 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/scripts/create-pull-request b/scripts/create-pull-request<br>
index e82858b..8f0be99 100755<br>
<div><div class="h5">--- a/scripts/create-pull-request<br>
+++ b/scripts/create-pull-request<br>
@@ -34,7 +34,7 @@ RFC=0<br>
 usage() {<br>
 CMD=$(basename $0)<br>
 cat &lt;&lt;EOM<br>
-Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch]<br>
+Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to] [-i commit_id] [-d relative_dir] -u remote [-b branch] [-t in_reply_to]<br>
   -b branch           Branch name in the specified remote (default: current branch)<br>
   -l local branch     Local branch name (default: HEAD)<br>
   -c                  Create an RFC (Request for Comment) patch series<br>
@@ -49,6 +49,7 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to<br>
   -s subject          The subject to be inserted into the summary email<br>
   -u remote           The git remote where the branch is located, or set CPR_CONTRIB_REMOTE in env<br>
   -d relative_dir     Generate patches relative to directory<br>
+  -t in_reply_to      Make mails appear as replies to the given Message-Id, to continue patch/series threads<br>
<br>
  Examples:<br>
    $CMD -u contrib -b nitin/basic<br>
@@ -57,12 +58,13 @@ Usage: $CMD [-h] [-o output_dir] [-m msg_body_file] [-s subject] [-r relative_to<br>
    $CMD -u contrib -r master -i misc -b nitin/misc -o pull-misc<br>
    $CMD -u contrib -p &quot;RFC PATCH&quot; -b nitin/experimental<br>
    $CMD -u contrib -i misc -b nitin/misc -d ./bitbake<br>
+   $CMD -u contrib -p &quot;OE-core][PATCH v2&quot; -t &quot;&lt;<a href="mailto:cover.11146.git.john.doe@example.com">cover.11146.git.john.doe@<wbr>example.com</a>&gt;&quot;<br>
 EOM<br>
 }<br>
<br>
 REMOTE=&quot;$CPR_CONTRIB_REMOTE&quot;<br>
 # Parse and validate arguments<br>
-while getopts &quot;b:acd:hi:m:o:p:r:s:u:l:&quot; OPT; do<br>
+while getopts &quot;b:acd:hi:m:o:p:r:s:u:l:t:&quot; OPT; do<br>
        case $OPT in<br>
        b)<br>
                BRANCH=&quot;$OPTARG&quot;<br>
</div></div>@@ -108,7 +110,10 @@ while getopts &quot;b:acd:hi:m:o:p:r:s:u:l:&quot; OPT; do<br>
        a)<br>
                CPR_CONTRIB_AUTO_PUSH=&quot;1&quot;<br>
                ;;<br>
-       esac<br>
<span class="">+        t)<br>
+                IN_REPLY_TO=&quot;$OPTARG&quot;<br>
</span><span class="">+                ;;<br>
+        esac<br>
 done<br>
<br>
 if [ -z &quot;$REMOTE&quot; ]; then<br>
</span>@@ -205,7 +210,11 @@ if [ -n &quot;$RELDIR&quot; ]; then<br>
<span class=""> fi<br>
<br>
 # Generate the patches and cover letter<br>
-git format-patch $extraopts -M40 --subject-prefix=&quot;$PREFIX&quot; -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID &gt; /dev/null<br>
</span>+if [ -n &quot;$IN_REPLY_TO&quot; ]; then<br>
<div class="HOEnZb"><div class="h5">+    git format-patch $extraopts -M40 --subject-prefix=&quot;$PREFIX&quot; -n -o $ODIR --thread=shallow --in-reply-to=&quot;$IN_REPLY_TO&quot; --cover-letter $RELATIVE_TO..$COMMIT_ID &gt; /dev/null<br>
+else<br>
+    git format-patch $extraopts -M40 --subject-prefix=&quot;$PREFIX&quot; -n -o $ODIR --thread=shallow --cover-letter $RELATIVE_TO..$COMMIT_ID &gt; /dev/null<br>
+fi<br>
<br>
 if [ -z &quot;$(ls -A $ODIR 2&gt; /dev/null)&quot; ]; then<br>
     echo &quot;ERROR: $ODIR is empty, no cover letter and patches was generated!&quot;<br>
--<br>
2.7.4<br>
<br>
--<br>
______________________________<wbr>_________________<br>
Openembedded-core mailing list<br>
<a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.<wbr>openembedded.org</a><br>
<a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core" rel="noreferrer" target="_blank">http://lists.openembedded.org/<wbr>mailman/listinfo/openembedded-<wbr>core</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div>
</div></div>