I am browsing the differences between two branches of a repository via

git diff --name-only branch1 branch2

I also use the --name-status option sometimes, since I may need to see what sort of difference there is for a given file. Plodding along with plain old git will do the job, but there are some obvious deficiencies. The main ones are: no color, no Emacs operations, and you cannot collapse directories. It makes this diff rather cumbersome to work through. Moreover, both branches are large and there are many differences between them.

Does Magit have some sort of diff interface that allows you to use --name-only & --name-status? I don't see any switches or options for doing this in *magit-diff-popup*.

1 Answer 1


The diff popup doesn't (currently) support --name-only or --name-status. You could add them yourself with magit-define-popup-switch and the output will show, but the buffer won't be parsed correctly.

You can achieve a similar output by calling magit-section-cycle-diffs (M-tab), but I'd guess you're trying to avoid including the diffs at all since you say that there are many differences between the two branches.

  • Thanks for the suggestions. Yes, unfortunately M-tab hasn't helped much because Magit starts choking Emacs when it tries to render the diffs. M-tab only helps after the diffs are rendered. Is there a way to get Magit to trigger that function (or something similar) before it starts trying to render the diffs?
    – GDP2
    Dec 5, 2017 at 20:20
  • You could try setting magit-diff-expansion-threshold to a low value.
    – Kyle Meyer
    Dec 5, 2017 at 21:57
  • Well, I set magit-diff-expansion-threshold to 0.1 and the diff still took forever. I don't even know how long it will take since I stopped it after 10-15 minutes. Any other suggestions?
    – GDP2
    Dec 6, 2017 at 7:43

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.