libgit2/libgit2 — pull request #664 by arrbee (2012-05-03 23:43:57+00:00)
Title: Support git attrs from index (and bare repo)

Depending on the operation, we need to consider gitattributes in both the work dir and the index. This adds a parameter to all of the gitattributes related functions that allows user control of attribute reading behavior (i.e. prefer workdir, prefer index, only use index).

This fix also covers allowing us to check attributes (and hence do diff and status) on bare repositories.

This was a somewhat larger change that I hoped because it had to change the cache key used for gitattributes files.

I took the opportunity to update the lacking docs in the `attr.h` header.