diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-08-07 22:09:43 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2018-08-09 17:51:32 +0200 |
commit | d3a840644ff2df75dc8605704e9032346d8127df (patch) | |
tree | db638575cc35c3084ff323f18992aa6f8419fd3a | |
parent | 4c1f96aaecae73b1c8a0013b364505e22ffa01c2 (diff) |
dim: add From: tags for pull requests
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 <airlied@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Acked-by: Dave Airlie <airlied@redhat.com>
Tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
-rwxr-xr-x | dim | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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 |