Gitweb with 'side-by-side' diff 09 Oct, 2011 Gitweb with 'side-by-side' diff

Update: With git v1.7.9.5, this hack below is not needed anymore. Gitweb comes with sidebyside diff.

Bonus: Simultaneously scroll left and right files with overflow.

Dependencies: jQuery

Usage: Simply include jQuery in gitweb/gitweb.cgi (within the head tag).

Future work: Going by this thread on kerneltrap.org, ‘side-by-side’ diff appears to have been on the team’s TODO list and never gotton around to being implemented. So, except for the simultaneous scrolling, I intend to port this to Perl and hope to get it integrated into Gitweb core. Simultaneous scrolling needs to be done in Javascript and the fact that external dependencies are frowned upon,

Note that we frown upon introducing extra dependencies for gitweb, unless they are optional, and best detected automatically.

scrolling needs to be handled separately in gitweb.js (the currently implementation depends on jQuery).

Screenshot: Gitweb side-by-side diff

Gist: https://gist.github.com/1274726



Tags  ·   gitweb  ·   diff  ·   Show Comments ▾


     
Original design for Tumblr crafted by Prashanth Kamalakanthan.
Adapted for Tumblr & Jekyll by Sai Charan. Customized theme available on Github.

Sai Charan's blog by Sai Charan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Creative Commons License