how to diff contents of a folder (recursively) against latest (or earlier) revision in SCM repo (e.g., Git ?)


I'm working with a project imported from maven (but i don't think the build framework matters)..

anyway.. if i right click on one of the files in the project and select Git (my SCM system) i see an option 'compare with same repository version'.
However, if i right click on the containing folder of this file this option is grayed out.

i can request the  Git / Show History.. but when i click on 'compare with local'  i get an error dialog that say  'not applicable to the file:  file://home/me/project/etc/etc....'

I've done this in the past with IDEA.. now i can't get it to work..    did something break or change.. ?   or did i just forget how it is done?

thanks !



Maybe Compare with Branch can do the job? In trunk build (122.441) I select the branch (like origin/master), it shows me the file tree and I can call Diff for any file. Any problems here?



Hmmm  i don't see an option to select branch when i select a folder.  I do see a 'compare with branch' when i select a leaf level artifact (file).
but my goal is to see all changes (recursively) that exist between a folder's current state in the workspace, and the state of the folder (and all of its contained subfolders and files)  
as of some revision in the SCM repository.

still not clear on how it is done.  but thanks for your response in any case !


I'm going to answer this question my self  (for anyone who is interested).. the way to do this is to select the revision you wish to examine diffs for, then click on show all affected paths.
This will give you a tree view of the files in that check in.  

using this tree view  you can select 'Show Diff' on any artifact, and you can see the difference between the state of the artifact as of that revision diff'd with the state of the artifact immediately prior to that revision.

This is basically what i want..   The diffs are side by side which is very helpful.

Now i have not figured out how you can get a diff between two arbitrary revisions (SHA's) in the repo... this technique just seems to work for a diffing a given revision and the revision immediately before it.    


OK.. this is my bad.  It is NOT what I want.  I can do what i want, but the method i use is clunky.  i've written it up in case anyone cares.
but i will file a bug requesting an easier way.

see my second answer, here>


Please sign in to leave a comment.