libgit2/objective-git — pull request #85 by rowanj (2012-09-13 13:21:39+00:00)
Title: Return the working directory path from `GTRepository.fileURL` as commented

Implement the `NSURL* fileURL` property in the same manner as the `NSURL* gitDirectoryURL` one. It now returns the working directory as the header comments indicate (or `nil` in the case of a bare repository)

Without this change, the `fileURL` property was set to the value as the repo URL, because the parameter to the `-(id) initWithURL: error:` method was overridden by the search for the repository directory before the `self.fileURL` ivar was initialised.

This resulted in the path passed to the callback block of `-(void) enumerateFileStatusUsingBlock:` having the wrong (non-existent) path; as `int file_status_callback(const char*, unsigned int, void *)` appends the relative path passed by libgit2 to the `fileURL`