views:

198

answers:

2

I'd like to be able to diff files / directories directly from the Linux Kernel GIT repository without having to download full source.

Specifically, I'm interested in two potential solutions:

  1. The ability to do diff's via a web browser ( firefox )
  2. A GUI utility for Ubuntu that can do remote diffs.
  3. A tutorial how to setup option #2

Edit

As an example of what I'm looking for, I used to use CrossVC for the above tasks on a CVS repo.

A: 

The system which creates the diff (whether that might be your webserver or your local system) must have a full copy (clone) of the git repo.

So you cannot do "remote diffs".

So, if you want to avoid doing a git clone of the whole kernel, why not just point your web browser to http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=summary?

ndim
That doesn't make any sense. On projects where I've used CVS I could remotely diff any two revisions of a particular file. Why wouldn't I be able to do that with GIT, which is supposed to be light years ahead of CVS?
Robert S. Barnes
Because CVS is **centralized** version control system (where most actions need network access), and Git is **distributed** version control system (where almost all actions are on local clone of repository). See also http://stackoverflow.com/questions/802573/difference-between-git-and-cvs/824241#824241
Jakub Narębski
+4  A: 

Gitweb at kernel.org allows to view diff between arbitrary commits, see for example the following link for diff between v2.6.32-rc6 and v2.6.32-rc7:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hp=refs/tags/v2.6.32-rc6;h=refs/tags/v2.6.32-rc7 (use patch link to get plain patch that you can apply), and between arbitrary versions of file / between arbitrary versions of arbitrary files, e.g.: diff to current link in history view.

Unfortunately neither official gitweb version (distributed together with Git itself), nor the fork used by kernel.org generates links between arbitrary commits, so you would have to handcraft (create by hand) URLs to give to gitweb. In the case of commitdiff view (action) the iparameters you need are 'h' (hash) and 'hp' (hash parent); in the case of blobdiff view they are 'hb' (hash base) and 'hpb' (hash parent base), and also 'f' (filename) and 'fp' (file parent).

Templates

  • For diff between two arbitrary commits (equivalent of git diff A B from command line) http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;hp=A;h=B

  • For diff between two versions of the same file (equivalent of git diff A B <filename>). http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blobdiff;f=&lt;filename&gt;;hpb=A;hp=B

Note that core gitweb (but not the fork used by kernel.org, currently) you can use path_info version, e.g.:
http://repo.or.cz/w/git.git/blobdiff/A..B:/&lt;filename&gt;

Jakub Narębski
I don't suppose you could provide a template URL for diffing two arbitrary version of an arbitrary file?
Robert S. Barnes
Templates added
Jakub Narębski