libgit2/libgit2 — Issue #508: Add `.gitattributes` support
Author: tanoku
Created: 2011-12-07 15:21:19+00:00
State: open

This is necessary before we can implement a lot of porcelain operations.

Relevant information regarding `.gitattributes` can be found on the manpage: http://linux.die.net/man/5/gitattributes

What we need is an API based on `git_repository` that takes a path to a file in the repository's working dir and returns its attribute data. This needs to be very *efficient* because it's an operation that will happen often.

Consider implementing caching layers: note that to obtain the attributes for any given path (e.g. /foo/bar/baz), you must check and compose the attributes in `/foo/bar/.gitattributes`, `/foo/.gitattributes/`, `.gitattributes` and `$GIT_DIR/info/attributes`.

MAKE IT FAST.