Question: Is there a way to limit `git diff` to changed files?

I'd like to see the differences between two commits, but exclude paths that don't exist in one or the other (additions/deletions). The following Perl one-liner illustrates most of what I want:

```
git diff master.. | perl -lnwe 'print unless /^(new|deleted) file/../^diff/ and not /^diff/'

```

But that leaves `diff --git a/path b/path` lines for the files that were new or deleted. Plus it'd be much nicer if I didn't have to parse (also fails if any hunk contains anything matching /^diff/, for example).

Another alternative I tried was:

```
git diff --name-status (args) | perl -lnwe 'print if s/^M\s+//' | xargs git diff (args) --

```

Its output is better, but it still feels hackish.

Answer: 
You can use the --diff-filter flag to do precisely this. `git diff --diff-filter=CMRTUXB master..` should show everything except added/deleted files.
I've used Notepad++ (Windows), and these regular expressions to filter out extension types and certain paths from a diff file.

```
^Index.*\.(dll|pdb|exe|txt|zip|log|ism|resx|tlog|htm|lib)$[\s\S.]*?^Index
^Index: Shared/.+$[\s\S.]*?^Index
^Index: Next/source/Utility/.+$[\s\S.]*?^Index

```

Only problem is, when it reaches the end. You have to 'ctrl+home' and go again until it finds nothing.

(Replace whats found with 'Index')