libgit2_d.example.common

Undocumented in source.

Members

Aliases

O_RDONLY
alias O_RDONLY = core.stdc.stdio.O_RDONLY
Undocumented in source.
O_RDONLY
alias O_RDONLY = core.sys.posix.fcntl.O_RDONLY
Undocumented in source.
close
alias close = core.stdc.stdio._close
Undocumented in source.
close
alias close = core.sys.posix.unistd.close
Undocumented in source.
fstat
alias fstat = core.sys.windows.stat.fstat
Undocumented in source.
fstat
alias fstat = core.sys.posix.sys.stat.fstat
Undocumented in source.
open
alias open = core.stdc.stdio._open
Undocumented in source.
open
alias open = core.sys.posix.fcntl.open
Undocumented in source.
read
alias read = _read
Undocumented in source.
read
alias read = core.sys.posix.unistd.read
Undocumented in source.
sleep
alias sleep = core.sys.posix.unistd.sleep
Undocumented in source.
snprintf
alias snprintf = core.stdc.stdio.snprintf
Undocumented in source.
snprintf
alias snprintf = core.sys.posix.stdio.snprintf
Undocumented in source.
ssize_t
alias ssize_t = int
Undocumented in source.
ssize_t
alias ssize_t = core.sys.posix.sys.types.ssize_t
Undocumented in source.
stat
alias stat = core.sys.windows.stat.struct_stat
Undocumented in source.
stat
alias stat = core.sys.posix.sys.stat.stat_t
Undocumented in source.
strcasecmp
alias strcasecmp = core.sys.posix.strings.strcasecmp
Undocumented in source.

Functions

_read
int _read(int , void* , uint )
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
check_lg2
void check_lg2(int error, const(char)* message, const(char)* extra)

Check libgit2 error code, printing error to stderr on failure and exiting the program.

cred_acquire_cb
int cred_acquire_cb(libgit2_d.credential.git_credential** out_, const(char)* url, const(char)* username_from_url, uint allowed_types, void* payload)

Acquire credentials via command line

diff_output
int diff_output(const(libgit2_d.diff.git_diff_delta)* d, const(libgit2_d.diff.git_diff_hunk)* h, const(libgit2_d.diff.git_diff_line)* l, void* p)

Basic output function for plain text diff output Pass core.stdc.stdio.FILE* such as core.stdc.stdio.stdout or core.stdc.stdio.stderr as payload (or null == core.stdc.stdio.stdout)

fatal
void fatal(const(char)* message, const(char)* extra)

Exit the program, printing error to stderr

read_file
char* read_file(const(char)* path)

Read a file into a buffer

resolve_refish
int resolve_refish(libgit2_d.types.git_annotated_commit** commit, libgit2_d.types.git_repository* repo, const(char)* refish)

Convert a refish to an annotated commit.

sleep
void sleep(int a)
Undocumented in source.
treeish_to_tree
void treeish_to_tree(libgit2_d.types.git_tree** out_, libgit2_d.types.git_repository* repo, const(char)* treeish)

Convert a treeish argument to an actual tree; this will call check_lg2 and exit the program if treeish cannot be resolved to a tree

xrealloc
void* xrealloc(void* oldp, size_t newsz)

A realloc that exits on failure

Manifest constants

PRIuZ
enum PRIuZ;
Undocumented in source.
PRIuZ
enum PRIuZ;
Undocumented in source.

Meta