git.util

Members

Functions

gitStr
const(char)* gitStr(const(char)[] s)

Converts the passed char slice to a C string, returning the null pointer for empty strings.

require
void require(bool state, Exception next = null, string file = __FILE__, size_t line = __LINE__)

Call this function when an error code is returned from a git function. It will retrieve the last error and throw a GitException.

requireBool
bool requireBool(int result, string file = __FILE__, size_t line = __LINE__)

Require the result to be either 1 or 0. If it is, return the boolean value, otherwise throw a GitException.

toPosixPath
string toPosixPath(string input)

Return a posix-native path, replacing backslashes with forward slashes.

Meta