On Tue, Aug 7, 2018 at 10:23 PM, Dave Airlie <[email protected]> wrote:
> On 8 August 2018 at 06:11, Daniel Vetter <[email protected]> wrote:
>> Requested by Dave Airlie, so that we automatically record the pull
>> request submitter somewhere. After quick irc chat we decided to put it
>> at the bottom, to avoid confusion with the From: git format-patch
>> inserts at the top for authors not matching the patch submitter.
>>
>> Requested-by: Dave Airlie <[email protected]>
>> Cc: Dave Airlie <[email protected]>
>> Signed-off-by: Daniel Vetter <[email protected]>
>
> Works for me.
>
> if there is more than one match to the grep will it pull that out?

It should add them all and you get to hand-edit the mess :-)

> Tested-by: Dave Airlie <[email protected]>

Can I haz an ack too for pushing?
-Daniel

>
>> ---
>>  dim | 5 ++++-
>>  1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/dim b/dim
>> index 5ca4646ff685..a1c194318b56 100755
>> --- a/dim
>> +++ b/dim
>> @@ -945,7 +945,7 @@ function dim_apply_branch
>>
>>  function dim_apply_pull
>>  {
>> -       local branch file message_id pull_branch rv merge_msg_file
>> +       local branch file message_id pull_branch rv merge_msg_file from_line
>>
>>         branch=${1:?$usage}
>>         file=$(mktemp)
>> @@ -956,6 +956,7 @@ function dim_apply_pull
>>         cat > $file
>>
>>         pull_branch=$(sed -ne '/[gG]it repository at:$/{n;n;p}' $file)
>> +       from_line=$(grep '^From:' $file)
>>
>>         if [[ -z "$pull_branch" ]] ; then
>>                 echoerr "no pull request found"
>> @@ -982,6 +983,7 @@ function dim_apply_pull
>>
>>                         merge_msg_file="$(git_dir)/MERGE_MSG"
>>                         if [ -n "$message_id" ]; then
>> +                               echo "$from_line" >> $merge_msg_file
>>                                 echo "Link: 
>> https://patchwork.freedesktop.org/patch/msgid/$message_id"; >> $merge_msg_file
>>                         fi
>>
>> @@ -994,6 +996,7 @@ function dim_apply_pull
>>
>>         $DRY git commit --amend -s --no-edit
>>         if [ -n "$message_id" ]; then
>> +               $DRY dim_commit_add_tag "$from_line"
>>                 $DRY dim_commit_add_tag "Link: 
>> https://patchwork.freedesktop.org/patch/msgid/$message_id";
>>         fi
>>
>> --
>> 2.18.0
>>
>> _______________________________________________
>> dim-tools mailing list
>> [email protected]
>> https://lists.freedesktop.org/mailman/listinfo/dim-tools



-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dim-tools mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dim-tools

Reply via email to