0

When using magit on a local file, I stage my changes and I then press c and c again to commit. I get a new window showing the diff and a window for the commit message. I write my commit message press C-c C-c and the dif and commit window close.

However when using magit on a remote file using tramp, if I stage a change then press c and c again to commit, I only get a new window for the commit message not the diff window. I can write the commit message as normal, but not being able to see the diff at this point is annoying.

One thing I noticed is that if I do not stage my changes when using magit on tramp and I go to commit, I DO get a dif window, with the message in the message buffer "Nothing staged. Stage and commit all unstaged changes?(Y or n)" I can then then type Y to make the commit. But this way is only allowing me to see a dif for all changes to be placed in one commit, rather than the bits I want to stage for a commit.

How can I get magit to open the diff window when the commit message window is opened on a remote file using tramp?

  • If you hit C-c C-d (magit-diff-while-committing) in the COMMIT_EDITMSG buffer, does it bring up the diff? – npostavs Apr 18 at 11:24
  • That does show the diff - thanks for that :) But it would still be good for that to come up automatically... – user27815 Apr 18 at 12:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.