libgit2/libgit2 — pull request #1148 by scunz (2012-12-17 16:25:28+00:00)
Title: Cleanup the empty-clone test correctly

The test in `clone/empty.c` currently fails to execute correctly. This is for 2 reasons:
a) It doesn't set a global state to "I have clean up", resulting in double deletions.
b) `cl_git_sandbox_init` doesn't increment the reference counter on the returned repository, thus freeing this pointer with `git_repository_free` brings the reference counting out of balance.

Compare recent [travis builds](https://travis-ci.org/libgit2/libgit2/jobs/3704156). Why does Travis mark these builds "green", when there are clearly visible segfaults?