8

When viewing a merge commit it only shows the number of lines changed but no diff.

I know that it is possible with git show --first-parent. Is there a way to add an argument to magit-show-commit?

I'm aware that I can just diff from the commit view but I thought there may be a way to do it directly when viewing the commit.

1 Answer 1

11

Use the diff dwim command instead (d d); it does what you want it to do in this case too.

4
  • DWIM can only use heuristics to infer what I actually mean and sometimes gets it wrong. How can I explicitly tell it what I want and how can I make it do so by default?
    – Atemu
    Feb 27 at 15:02
  • You can make it do its thing and then observe the result.
    – tarsius
    Mar 26 at 21:36
  • Problem is that the result isn't always what I mean.
    – Atemu
    Mar 28 at 14:08
  • 1
    There are other diff commands that allow you to specify exactly what you want to do in any given situation. (You won't always want to do the same thing, and even if you do, other users won't.) magit-diff-dwim is not configurable. You can look at the implementation of that command and others, and implement magit-diff-dwatemum. You are in a better position to implement that, than I am. With magit-diff-dwim I tried to implement something that works fairly well for many different values of i.
    – tarsius
    Apr 18 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.