Discussion:
How to diff two branches with ediff preview
Markus Lachinger
9 years ago
Permalink
Is there a way in emacs, spacemacs to be precise, to diff two branches and get a list of changed files (I use magit diff revision for this now) BUT ALSO allow me to diff the file at point in the list in a ediff session below?

So my ideal workflow would be:

magit-diff the branches

----------------------
| foo.rb |
| bar.txt |
| ..... |
----------------------
When I now go onto foo.rb and trigger the function I am looking for, it will spawn a ediff below:

----------------------
| foo.rb |
| bar.txt |
| ..... |
----------------------
| foo.1 | foo.2 |
| | |
| + Hello | |
| World | World |
----------------------

Doing the same again on the diff list will change the ediff file, i.a. when I go back to the list and call the function on bar.txt it will replace the ediff with the ediff for the bar.txt

Is there any way to do this with vc / magit or another plugin? I have no idea yet how to script emacs :/


(also asked on stackoverflow here: http://stackoverflow.com/questions/33601547/how-to-diff-two-branches-in-emacs-with-ediff-preview )
--
You received this message because you are subscribed to the Google Groups "magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Kyle Meyer
9 years ago
Permalink
Markus Lachinger <***@gmail.com> writes:

[...]
...
Not that I'm know of.

So IIUC, you want

1) to be able to call magit-ediff from a file line in a diff buffer
2) keep the original diff buffer visible
3) have the ediff session update to a new file without having to
manually quit the previous ediff session

At least at first glance, my guess is that #2 and #3 would require some
pretty tricky fiddling with ediff, and I'm not sure I understand what
the motivation is there.

#1 seems like a reasonable context for magit-ediff-dwim to be aware of,
and I think it should be straightforward to add.

--
Kyle
--
You received this message because you are subscribed to the Google Groups "magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Markus Lachinger
9 years ago
Permalink
...
The motivation / use case is to be able to quickly assess the changes that were made i.e. between two branches while having more context than just the diff ± a few lines, or just be able to jump around in the file.

I could use RET to jump to the file and then switch back the buffer, but that is pretty irritating

Is there a better/'more magit' way to do that which I am not thinking of?
Post by Kyle Meyer
#1 seems like a reasonable context for magit-ediff-dwim to be aware of,
and I think it should be straightforward to add.
--
Kyle
--
You received this message because you are subscribed to the Google Groups "magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Kyle Meyer
9 years ago
Permalink
Markus Lachinger <***@gmail.com> writes:

[...]
Post by Markus Lachinger
The motivation / use case is to be able to quickly assess the changes
that were made i.e. between two branches while having more context
than just the diff ± a few lines, or just be able to jump around in
the file.
I could use RET to jump to the file and then switch back the buffer, but that is pretty irritating
So the main irritation is that it replaces the diff window? I suppose
when I want to get back to the diff buffer, I typically call
winner-undo. Or if you give a C-u, magit-diff-visit-file will open it
in another window.
Post by Markus Lachinger
Is there a better/'more magit' way to do that which I am not thinking of?
Depending on how much more context you want to see, you could try
magit-diff-more-context (+).

--
Kyle
--
You received this message because you are subscribed to the Google Groups "magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to magit+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...