libgit2/libgit2 — pull request #537 by nulltoken (2012-01-18 23:24:03+00:00)
Title: Fix download segfault

This PR fixes an issue detected by @uluhonolulu (cf this [comment](https://github.com/libgit2/libgit2sharp/issues/65#issuecomment-3546097)).

Prevent `git_remote_download()` from segfaulting when being passed a lightweight remote built with git_remote_new()

Those lightweight remotes have no refspec which was making `git__fnmatch()` very uneasy.

@tanoku What is the current policy regarding network features and tests? Should the tests stay local only? Should they go over the network (and potentially fail because of a proxy error, GitHub downtime, ...)? Should they always run (or be switched on/off through some magic configuration wizardry)?

/cc @carlosmn