Fixed erroneous shouldIgnoreFile return value by onecrayon · Pull Request #543 · libgit2/objective-git (original) (raw)

Per the git_status_should_ignore docs (emphasis mine):

ignored: Boolean returning 0 if the file is not ignored, 1 if it is

However, the current implementation was returning YES ("the file should be ignored") if the ignore state was 0 ("the file should not be ignored").

Also tweaked the documentation comment to accurately describe the fileURL parameter; I tested and both an absolute path derived from an NSURL (currently in use) and a string path relative to the repository root work fine, so I didn't see any reason to change the method to match the documentation comment instead.