libgit2/libgit2 — pull request #2267 by robrix (2014-04-14 18:41:03+00:00)
Title: Don’t treat /-prefixed ignores relative to source.

By removing the context and passing NULL as git_attr_fnmatch__parse’s
source, we avoid issues where a global core.excludesfile named
“.gitignore” will treat any patterns starting with / as specifying
paths relative to the location of that file.

For example, if the core.excludesfile is ~/.gitignore, a pattern of
“/foo” would only match within ~/, not within an arbitrary repo.

Fixes #2266.