* [PATCH] dim: Add add-missing-cc command
@ 2017-07-12 6:17 Maarten Lankhorst
2017-07-12 9:53 ` Jani Nikula
0 siblings, 1 reply; 6+ messages in thread
From: Maarten Lankhorst @ 2017-07-12 6:17 UTC (permalink / raw)
To: dri-devel, intel-gfx
This commit will take the topmost commit and add all cc's from
get_maintainer.pl, it is useful for adding cc's to an entire patch
series touching multiple drivers, to add the right cc to each one.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
---
dim | 41 +++++++++++++++++++++++++++++++++++++++++
dim.rst | 6 ++++++
2 files changed, 47 insertions(+)
diff --git a/dim b/dim
index 267dbc0313b1..2378ec56e438 100755
--- a/dim
+++ b/dim
@@ -1914,6 +1914,47 @@ function dim_fixes
fi
}
+function dim_add_missing_cc
+{
+ git show | scripts/get_maintainer.pl --email --norolestats --pattern-depth 1 | while read cc; do
+ email="$(echo "$cc" | sed -e 's/.*<//' -e 's/>.*//')"
+ name=''
+
+ if echo "$cc" | grep -q '<'; then
+ name="$(echo ${cc/<*/} | sed -e 's/[[:space:]]*\$//')";
+ fi
+
+ # Don't add main mailing lists
+ if [ "$email" = "dri-devel@lists.freedesktop.org" -o \
+ "$email" = "linux-kernel@vger.kernel.org}" ]; then
+ continue
+ fi
+
+ # Variables from the while loop don't propagate,
+ # print out a 1 on success
+ matches=$(
+ git show -s | grep -i "^ Cc:" | sed 's/^ *[Cc][Cc]: *//' | while read testcc; do
+ testemail="$(echo "$testcc" | sed -e 's/.*<//' -e 's/>.*//')"
+
+ if [ "$testemail" != "$email" ]; then
+ if [ -z "$name" ]; then continue; fi
+
+ testname="$(echo ${testcc/<*/} | sed -e 's/[[:space:]]*\$//' -e 's/^[[:space:]]*//')"
+
+ if [ "$testname" != "$name" ]; then continue; fi
+ fi
+
+ echo 1
+ break
+ done
+ )
+
+ if [ -z "$matches" ]; then
+ $DRY dim_commit_add_tag "Cc: ${cc}"
+ fi
+ done
+}
+
function dim_help
{
manpage=$DIM_PREFIX/maintainer-tools/dim.rst
diff --git a/dim.rst b/dim.rst
index 10572f139130..ae511ca54cbe 100644
--- a/dim.rst
+++ b/dim.rst
@@ -274,6 +274,12 @@ add-link-queued
**add-link** shorthands for *drm-intel-fixes*, *drm-intel-next-fixes*, and
*drm-intel-next-queued* branches respectively.
+add-missing-cc
+--------------
+Adds missing cc's to the topmost commit, can be used with
+*git rebase --exec "dim add-missing-cc"*
+to add cc's for an entire patch series.
+
magic-rebase-resolve
--------------------
Tries to resolve a rebase conflict by first resetting the tree
--
2.11.0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] dim: Add add-missing-cc command
2017-07-12 6:17 [PATCH] dim: Add add-missing-cc command Maarten Lankhorst
@ 2017-07-12 9:53 ` Jani Nikula
2017-07-12 9:56 ` [Intel-gfx] " Maarten Lankhorst
0 siblings, 1 reply; 6+ messages in thread
From: Jani Nikula @ 2017-07-12 9:53 UTC (permalink / raw)
To: Maarten Lankhorst, dri-devel, intel-gfx
On Wed, 12 Jul 2017, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
> This commit will take the topmost commit and add all cc's from
> get_maintainer.pl, it is useful for adding cc's to an entire patch
> series touching multiple drivers, to add the right cc to each one.
>
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> dim | 41 +++++++++++++++++++++++++++++++++++++++++
> dim.rst | 6 ++++++
> 2 files changed, 47 insertions(+)
>
> diff --git a/dim b/dim
> index 267dbc0313b1..2378ec56e438 100755
> --- a/dim
> +++ b/dim
> @@ -1914,6 +1914,47 @@ function dim_fixes
> fi
> }
>
> +function dim_add_missing_cc
> +{
> + git show | scripts/get_maintainer.pl --email --norolestats --pattern-depth 1 | while read cc; do
> + email="$(echo "$cc" | sed -e 's/.*<//' -e 's/>.*//')"
> + name=''
> +
> + if echo "$cc" | grep -q '<'; then
> + name="$(echo ${cc/<*/} | sed -e 's/[[:space:]]*\$//')";
> + fi
> +
> + # Don't add main mailing lists
> + if [ "$email" = "dri-devel@lists.freedesktop.org" -o \
> + "$email" = "linux-kernel@vger.kernel.org}" ]; then
> + continue
> + fi
> +
> + # Variables from the while loop don't propagate,
> + # print out a 1 on success
> + matches=$(
> + git show -s | grep -i "^ Cc:" | sed 's/^ *[Cc][Cc]: *//' | while read testcc; do
> + testemail="$(echo "$testcc" | sed -e 's/.*<//' -e 's/>.*//')"
> +
> + if [ "$testemail" != "$email" ]; then
> + if [ -z "$name" ]; then continue; fi
> +
> + testname="$(echo ${testcc/<*/} | sed -e 's/[[:space:]]*\$//' -e 's/^[[:space:]]*//')"
> +
> + if [ "$testname" != "$name" ]; then continue; fi
> + fi
> +
> + echo 1
> + break
> + done
> + )
> +
> + if [ -z "$matches" ]; then
> + $DRY dim_commit_add_tag "Cc: ${cc}"
> + fi
> + done
> +}
> +
> function dim_help
> {
> manpage=$DIM_PREFIX/maintainer-tools/dim.rst
> diff --git a/dim.rst b/dim.rst
> index 10572f139130..ae511ca54cbe 100644
> --- a/dim.rst
> +++ b/dim.rst
> @@ -274,6 +274,12 @@ add-link-queued
> **add-link** shorthands for *drm-intel-fixes*, *drm-intel-next-fixes*, and
> *drm-intel-next-queued* branches respectively.
>
> +add-missing-cc
> +--------------
> +Adds missing cc's to the topmost commit, can be used with
This needs the explanation what missing cc's are and where they are
added from.
BR,
Jani.
> +*git rebase --exec "dim add-missing-cc"*
> +to add cc's for an entire patch series.
> +
> magic-rebase-resolve
> --------------------
> Tries to resolve a rebase conflict by first resetting the tree
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] dim: Add add-missing-cc command
2017-07-12 9:53 ` Jani Nikula
@ 2017-07-12 9:56 ` Maarten Lankhorst
2017-07-12 10:33 ` Jani Nikula
0 siblings, 1 reply; 6+ messages in thread
From: Maarten Lankhorst @ 2017-07-12 9:56 UTC (permalink / raw)
To: Jani Nikula, dri-devel, intel-gfx
Op 12-07-17 om 11:53 schreef Jani Nikula:
> On Wed, 12 Jul 2017, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
>> This commit will take the topmost commit and add all cc's from
>> get_maintainer.pl, it is useful for adding cc's to an entire patch
>> series touching multiple drivers, to add the right cc to each one.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> dim | 41 +++++++++++++++++++++++++++++++++++++++++
>> dim.rst | 6 ++++++
>> 2 files changed, 47 insertions(+)
>>
>> diff --git a/dim b/dim
>> index 267dbc0313b1..2378ec56e438 100755
>> --- a/dim
>> +++ b/dim
>> @@ -1914,6 +1914,47 @@ function dim_fixes
>> fi
>> }
>>
>> +function dim_add_missing_cc
>> +{
>> + git show | scripts/get_maintainer.pl --email --norolestats --pattern-depth 1 | while read cc; do
>> + email="$(echo "$cc" | sed -e 's/.*<//' -e 's/>.*//')"
>> + name=''
>> +
>> + if echo "$cc" | grep -q '<'; then
>> + name="$(echo ${cc/<*/} | sed -e 's/[[:space:]]*\$//')";
>> + fi
>> +
>> + # Don't add main mailing lists
>> + if [ "$email" = "dri-devel@lists.freedesktop.org" -o \
>> + "$email" = "linux-kernel@vger.kernel.org}" ]; then
>> + continue
>> + fi
>> +
>> + # Variables from the while loop don't propagate,
>> + # print out a 1 on success
>> + matches=$(
>> + git show -s | grep -i "^ Cc:" | sed 's/^ *[Cc][Cc]: *//' | while read testcc; do
>> + testemail="$(echo "$testcc" | sed -e 's/.*<//' -e 's/>.*//')"
>> +
>> + if [ "$testemail" != "$email" ]; then
>> + if [ -z "$name" ]; then continue; fi
>> +
>> + testname="$(echo ${testcc/<*/} | sed -e 's/[[:space:]]*\$//' -e 's/^[[:space:]]*//')"
>> +
>> + if [ "$testname" != "$name" ]; then continue; fi
>> + fi
>> +
>> + echo 1
>> + break
>> + done
>> + )
>> +
>> + if [ -z "$matches" ]; then
>> + $DRY dim_commit_add_tag "Cc: ${cc}"
>> + fi
>> + done
>> +}
>> +
>> function dim_help
>> {
>> manpage=$DIM_PREFIX/maintainer-tools/dim.rst
>> diff --git a/dim.rst b/dim.rst
>> index 10572f139130..ae511ca54cbe 100644
>> --- a/dim.rst
>> +++ b/dim.rst
>> @@ -274,6 +274,12 @@ add-link-queued
>> **add-link** shorthands for *drm-intel-fixes*, *drm-intel-next-fixes*, and
>> *drm-intel-next-queued* branches respectively.
>>
>> +add-missing-cc
>> +--------------
>> +Adds missing cc's to the topmost commit, can be used with
> This needs the explanation what missing cc's are and where they are
> added from.
>
> BR,
> Jani.
How about the following?
add-missing-cc
--------------
Adds all maintainers from scripts/get_maintainer.pl as cc's to the topmost
commit. Any duplicates by name or email will be removed, so this can be used
with *git rebase --exec "dim add-missing-cc"* to add cc's for an entire patch
series that affect multiple drivers each with different maintainers.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] dim: Add add-missing-cc command
2017-07-12 10:33 ` Jani Nikula
@ 2017-07-12 10:28 ` Maarten Lankhorst
2017-07-12 11:41 ` Maarten Lankhorst
1 sibling, 0 replies; 6+ messages in thread
From: Maarten Lankhorst @ 2017-07-12 10:28 UTC (permalink / raw)
To: Jani Nikula, dri-devel, intel-gfx
Op 12-07-17 om 12:33 schreef Jani Nikula:
> On Wed, 12 Jul 2017, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
>> How about the following?
>>
>> add-missing-cc
>> --------------
>> Adds all maintainers from scripts/get_maintainer.pl as cc's to the topmost
>> commit. Any duplicates by name or email will be removed, so this can be used
>> with *git rebase --exec "dim add-missing-cc"* to add cc's for an entire patch
>> series that affect multiple drivers each with different maintainers.
> Works for me.
>
> J.
>
is that an ack?
~Maarten
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] dim: Add add-missing-cc command
2017-07-12 9:56 ` [Intel-gfx] " Maarten Lankhorst
@ 2017-07-12 10:33 ` Jani Nikula
2017-07-12 10:28 ` [Intel-gfx] " Maarten Lankhorst
2017-07-12 11:41 ` Maarten Lankhorst
0 siblings, 2 replies; 6+ messages in thread
From: Jani Nikula @ 2017-07-12 10:33 UTC (permalink / raw)
To: Maarten Lankhorst, dri-devel, intel-gfx
On Wed, 12 Jul 2017, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
> How about the following?
>
> add-missing-cc
> --------------
> Adds all maintainers from scripts/get_maintainer.pl as cc's to the topmost
> commit. Any duplicates by name or email will be removed, so this can be used
> with *git rebase --exec "dim add-missing-cc"* to add cc's for an entire patch
> series that affect multiple drivers each with different maintainers.
Works for me.
J.
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Intel-gfx] [PATCH] dim: Add add-missing-cc command
2017-07-12 10:33 ` Jani Nikula
2017-07-12 10:28 ` [Intel-gfx] " Maarten Lankhorst
@ 2017-07-12 11:41 ` Maarten Lankhorst
1 sibling, 0 replies; 6+ messages in thread
From: Maarten Lankhorst @ 2017-07-12 11:41 UTC (permalink / raw)
To: Jani Nikula, dri-devel, intel-gfx
Op 12-07-17 om 12:33 schreef Jani Nikula:
> On Wed, 12 Jul 2017, Maarten Lankhorst <maarten.lankhorst@linux.intel.com> wrote:
>> How about the following?
>>
>> add-missing-cc
>> --------------
>> Adds all maintainers from scripts/get_maintainer.pl as cc's to the topmost
>> commit. Any duplicates by name or email will be removed, so this can be used
>> with *git rebase --exec "dim add-missing-cc"* to add cc's for an entire patch
>> series that affect multiple drivers each with different maintainers.
> Works for me.
>
> J.
>
Thanks, pushed. :)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-07-12 11:41 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-12 6:17 [PATCH] dim: Add add-missing-cc command Maarten Lankhorst
2017-07-12 9:53 ` Jani Nikula
2017-07-12 9:56 ` [Intel-gfx] " Maarten Lankhorst
2017-07-12 10:33 ` Jani Nikula
2017-07-12 10:28 ` [Intel-gfx] " Maarten Lankhorst
2017-07-12 11:41 ` Maarten Lankhorst
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.