For portability, variable declarations have to go at the top of blocks in libgit2 (this one is after the call to `lookup_default_remote`)