Large github commit diff not shown

戏子无情 提交于 2019-11-27 04:26:52

问题


This happens to me both with Compare view as well as standard commits that are large in the amount of files changed.

The screenshot below is from a compare between two branches with 380 files changed. The files at the beginning of the diff log have their diffs visualized but at a certain point down the page it stops visualizing the diffs. I understand you don't want massive pages but I can't seem to find a way to view a file's diff individually. Instead I have to check these both out locally and do the diff manually.

Does anyone have a simpler solution whether it be software driven or (preferably) a link i'm missing on github?


回答1:


Adding .patch to the end of the URL somewhat helps. Removes the nice UI and comment functionality, of course.

An example. If your pull request is: https://github.com/JustinTulloss/zeromq.node/pull/47, then the patch can be found at https://github.com/JustinTulloss/zeromq.node/pull/47.patch




回答2:


Official support answer as of Feb 19th / 2013 via Brian Levin @github.

We have some limits on diffs that we show in the browser in order to keep the pull request and compare pages working. Currently, we cut them off at 300 files, a total diff of 1MB, and an individual diff of 100KB.

If your diffs exceed the limits and can't be viewed online, you can always pull the changes locally and view the diff there. It may not be as convenient for you, but it'll get the job done.




回答3:


This sounds like a bug on github. But you could see similar statistics using git diff on the command-line. And if you really want a graphical tool, perhaps installing something like meld would help.

git config --global diff.tool meld
git difftool master..devel



回答4:


The best local comparison I've found to use is to use IntelliJ's built in comparison. Adding comments is a pain, but everything else works well. Perform the following steps:

  1. Identify the file you're interested in, say "myClass.java"
  2. Pull the latest from your develop and your branch, call it compare_branch
  3. checkout the latest by git checkout compare_branch
  4. Open IntelliJ, and use double-shift completion to search for the file you need to look at, e.g. shift-shift myclass.java to navigate to it.
  5. In IntelliJ's menu, select VCS -> Git -> Compare with branch -> develop replace develop with whatever you want to compare against.

Hope this helps someone else.




回答5:


I had the same issue. If you're looking to keep with the browser experience I've found the following solution:

Open your JavaScript console and execute:

document.querySelectorAll('button.load-diff-button').forEach(button => button.click());

This will freeze the page since all click events are fired at the same time. Have some patience and everting will be loaded. Obviously if the document structure changes one might need to update the above statement.




回答6:


If you know which file or directory you want, you can use the GitHub File Diff extension, available for Chrome and Firefox.

Disclaimer: I made this extension.



来源:https://stackoverflow.com/questions/9702795/large-github-commit-diff-not-shown

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!