Pardon the Xcode, but I set a breakpoint on the [line in the clone test](https://github.com/ben/libgit2/blob/clone-cancel/tests-clar/online/clone.c#L192) where it cancels the transfer. Here's the call stack I get:

![libgit2 xcodeproj clone c](https://f.cloud.github.com/assets/39902/132630/37863e78-708c-11e2-8908-5990c368f7c8.jpg)

The return code passes directly through `do_progress_callback`, and it ends up in `git_indexer_stream_add`, which does this:

```c
		if (do_progress_callback(idx, stats) != 0) {
			error = GIT_EUSER;
			goto on_error;
		}
```

So I guess the only change that I'd need to be in line with your suggestion here is to roll back this change, and only test for `< 0`, since `writepack->add` should be returning a libgit2 error code. I'll do that.