From: Sean Paul <seanpaul@chromium.org>
To: intel-gfx@lists.freedesktop.org, ville.syrjala@linux.intel.com
Subject: [PATCH dim 2/2] dim: Curate and insert tags into patch(es)
Date: Thu, 23 Mar 2017 17:07:28 -0400 [thread overview]
Message-ID: <20170323210731.38313-2-seanpaul@chromium.org> (raw)
In-Reply-To: <20170323210731.38313-1-seanpaul@chromium.org>
Launch $EDITOR when extracting tags to curate the tags immediately. Once the
tags are proper, automatically add them before the first Signed-off-by line
to all patches in the range.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
---
dim | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/dim b/dim
index 43ea794..6a5580a 100755
--- a/dim
+++ b/dim
@@ -1145,6 +1145,12 @@ function rangeish()
fi
}
+function insert_extracted_tags
+{
+ new_tabs=`cat $1 | awk '{ORS="\\\\n"} {print $0}' | head -c-3`
+ awk "/Signed-off-by/{p++} p==1{print \"$new_tabs\"; p++} p!=1{print}"
+}
+
function dim_extract_tags
{
local branch range file tags
@@ -1167,9 +1173,10 @@ function dim_extract_tags
return 0
fi
- tags=$(printf -- "# *** extracted tags ***\n%s" "$tags")
-
- git filter-branch -f --msg-filter "cat ; echo \"$tags\"" $range
+ echo "$tags" > $file
+ $EDITOR $file
+ export -f insert_extracted_tags
+ git filter-branch -f --msg-filter "insert_extracted_tags $file" $range
}
function dim_extract_queued
--
2.12.1.500.gab5fba24ee-goog
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-03-23 21:07 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 21:07 [PATCH dim 1/2] dim: Add support for multiple messages in extract-tags Sean Paul
2017-03-23 21:07 ` Sean Paul [this message]
2017-03-24 7:54 ` [PATCH dim 2/2] dim: Curate and insert tags into patch(es) Jani Nikula
2017-03-24 14:04 ` Sean Paul
2017-04-03 21:10 ` [maintainer-tools PATCH v2 " Sean Paul
2017-04-06 11:50 ` Jani Nikula
2017-04-14 16:43 ` [maintainer-tools PATCH v3 " Sean Paul
2017-03-24 9:07 ` [PATCH dim " Ville Syrjälä
2017-03-24 14:09 ` Sean Paul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170323210731.38313-2-seanpaul@chromium.org \
--to=seanpaul@chromium.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).