#include "git.h" #include #include namespace GitFS { namespace Git { void throwError(int err) { #if LIBGIT2_VER_MINOR >= 28 const git_error * e = git_error_last(); #else const git_error * e = giterr_last(); #endif throw Error { err, e->klass, e->message }; } } } namespace std { std::ostream & operator<<(std::ostream & s, const git_oid & oid) { char str[GIT_OID_HEXSZ + 1]; git_oid_tostr(str, sizeof(str), &oid); s.write(str, GIT_OID_HEXSZ); return s; } }