Tracking file status changes in a Git log

I’m writing a program that consumes git log output to walk a repository’s history, and I want to know when files are added, deleted, copies, moved, or modified. git log --numstat is a straightforward way to see modifications, copies, and renames, but it doesn’t provide a good way to differentiate added or deleted files from modifications. (When a file is added, numstat just shows as many lines added as there are in the file, and when one is deleted, as many lines removed.)

Reading the patch headers generated by git log -p gives me this information, but I don’t care about the actual patch. Is there some way to only show the patch headers, or something similar?

Git Baby is a git and github fan, let's start git clone.