diff options
-rwxr-xr-x | dim | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -519,6 +519,15 @@ function rr_cache_dir fi } +function git_dir +{ + if [ -d $PWD/.git ] ; then + echo $PWD/.git + else + cut -d ' ' -f 2 < $PWD/.git + fi +} + function pull_rerere_cache { cd $DIM_PREFIX/drm-rerere/ @@ -905,7 +914,7 @@ function dim_apply_branch function dim_apply_pull { - local branch file message_id pull_branch rv + local branch file message_id pull_branch rv merge_msg_file branch=${1:?$usage} file=$(mktemp) @@ -935,6 +944,12 @@ function dim_apply_pull if ! $DRY git pull $pull_branch ; then if ! check_conflicts "$pull_branch" ; then echoerr "Please resolve and then commit normally using git" + + merge_msg_file="$(git_dir)/MERGE_MSG" + if [ -n "$message_id" ]; then + echo "Link: https://patchwork.freedesktop.org/patch/msgid/$message_id" >> $merge_msg_file + fi + return 1 else git add -u |