7

I would like to be able to review Github pull requests as a single ediff "session" (if that's the right word). However, whenever I use magit-ediff from Magit, I can only ediff a single file at once, then I have to exit the ediff session and restart a new ediff session on the next file.

Is there a way I can use ediff to review an entire Github pull request that may have multiple commits and multiple changed files?

Lee H
  • 2,727
  • 1
  • 17
  • 31
  • 1
    You might want to try: https://github.com/sigma/magit-gh-pulls I have not used it, but it may do what you need. Also you might find this relevant: http://endlessparentheses.com/merging-github-pull-requests-from-emacs.html – xmonk Apr 18 '15 at 15:17
  • You might also be interested in the second post of that series that @xmonk linked. – Malabarba Apr 18 '15 at 21:07
  • I have checked out magit-gh-pulls, but I was unable to get it working (it just never shows any pull requests). However, I still don't think it allows me to view a PR as a single ediff session though :( – Lee H Apr 21 '15 at 22:07

1 Answers1

2

You can view a Github pull request as a regular patch by appending .patch to the pull request's URL. For example, a pull request with URL https://github.com/bli25wisc/RSEM/pull/6 (modifying four files with three commits) can be viewed as a regular patch by visiting https://github.com/bli25wisc/RSEM/pull/6.patch which is automatically redirected to https://patch-diff.githubusercontent.com/raw/bli25wisc/RSEM/pull/6

The patch can be viewed in diff-mode or you can apply it and compare the differences with ediff-patch-file.

legoscia
  • 6,072
  • 30
  • 54
  • When I use ediff-patch-file, it unfortunately cannot resolve any of the files, I get: Ediff has inferred that /Users/hinmanm/src/elasticsearch/TransportShardReplicationOperationAction.java are two possible targets for this patch. However, these files do not exist. – Lee H Apr 23 '15 at 23:06
  • Do these files exist? Or are they supposed to be created by the patch? I guess it would be helpful to see the patch in question. –  Apr 24 '15 at 07:17
  • Here is the example pull request: https://github.com/elastic/elasticsearch/pull/10624 – Lee H Apr 24 '15 at 15:21