Using ediff as git mergetool

前端 未结 12 520
天命终不由人
天命终不由人 2020-12-12 10:22

I would like to be able to use ediff with \"git mergetool\".

I found some patches that alter the source code, which I don\'t want to do. Instead, I\'d like to add ed

12条回答
  •  一个人的身影
    2020-12-12 11:02

    Aside from the git vs bzr issue I identified in my comment above, I was able to confirm that you need to escape the parens as in

     cmd = emacs --eval "\\(ediff-merge-files-with-ancestor \"$LOCAL\" \"$REMOTE\" \"$BASE\" nil \"$MERGED\"\\)"
    

    Note the double backslash characters. I kind of understand that they are needed (rather than a single one) to get through both the sh/bash quoting AND the emacs startup quoting mechanisms. I'll leave it to someone with a better grasp of Emacs and shell quoting to explain the gory details.

    -pmr

提交回复
热议问题