Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get more lines of context in Github

Tags:

github

diff

In github commit viewer or pull request viewer, or the compare view, can I have it show more lines of context around the diffs?

Using git cli, I'd do git diff -U100 (or however many lines of context I wanted).

I checked out help.github.com with no luck (lines of context doesn't even show up). Other diff viewers usually do this, and other code review tools usually do this. And Github has all kinds of hidden features, so I figured there might be a hidden feature here. Is this possible?

like image 462
Nick Gerner Avatar asked Jan 18 '13 22:01

Nick Gerner


2 Answers

I also sent a feature request to github with a similar response, but in the meantime have been using mridgway's github-expand-diff FF/chrome greasemonkey script, which works pretty nicely:

https://github.com/mridgway/github-expand-diff

like image 181
jeffthink Avatar answered Nov 13 '22 03:11

jeffthink


Update: This feature exist now https://github.com/blog/1705-expanding-context-in-diffs

I sent a feature request to github about this some month ago and got this answer:

Mattias,

Thanks for the feedback. Rest assured we know the diff display could be improved, since we feel this same pain quite a bit. We have Ideas™.

Yossef

So lets hope they come up with something nice.

like image 21
Mattias Wadman Avatar answered Nov 13 '22 03:11

Mattias Wadman