It doesn't like the git_refspec_transform function that this is based on does that, no. If you get back 0, you know that a string has been written to *out and that it is null-terminated.