libgit2/libgit2 — pull request #677 by arrbee (2012-05-08 22:06:55+00:00)
Title: Add support for diffing index with no HEAD

When a repo is first created, there is no HEAD yet and attempting to diff files in the index was showing nothing because a tree iterator could not be constructed. This adds an "empty" iterator and falls back on that when the head cannot be looked up.