22

Is there an easy way to compare the file tree of an old git commit with the working file tree, in meld?

git-difftool does something very similar, but I don't want it to actually do any diffing; the whole point is that the tool it is calling can provide a better interface for that.

Andrew Wagner
  • 22,677
  • 21
  • 86
  • 100
  • 2
    see also [more general version](http://stackoverflow.com/questions/1220309/git-difftool-open-all-diff-files-immediately-not-in-serial) of this question – Ilia K. Aug 14 '11 at 20:43

3 Answers3

43

With git > 1.7.11, the git difftool command now supports diffing complete directories using the --dir-diff command. This can be used together with meld:

$ git difftool --tool=meld --dir-diff [commit-to-diff-against]
Stefan Seemayer
  • 2,017
  • 16
  • 22
10

I've tested this on a recent version of meld and it is now built in. You can use it with meld <directory path> so "meld ." works for the current directory. You can checkout a version git co [version] then git reset [version]^ and then run "meld ." to compare any version with it's previous version.

rado
  • 4,040
  • 3
  • 32
  • 26
6

I also found this issue annoying so I've made git meld which allows a more comfortable way of diffing arbitrary commits against the working tree or the staging area. You can find it at https://github.com/wmanley/git-meld .

Will Manley
  • 2,340
  • 22
  • 17
  • 2
    What's the difference between git-meld and https://github.com/thenigan/git-diffall? I tried both and had the impression the functionality is identical. – kynan Jul 25 '11 at 15:07
  • @kynan: Doesn't git-meld let you use meld's directory diff UI to view the changes in a commit, whereas git-diffall would open all diffs (in the diff UI)? – idbrii Aug 05 '12 at 19:57
  • @pydave afaics both check out the trees of the 2 revisions to diff to temporary directories and then launch a directory diff on those - no difference there. – kynan Aug 20 '12 at 10:51
  • @kynan: You're right, I was confused with this git-diffall: http://stackoverflow.com/a/1291578/79125 – idbrii Aug 22 '12 at 14:47