libgit2.example.log

This example demonstrates the libgit2 rev walker APIs to roughly simulate the output of git log and a few of command line arguments. git log has many many options and this only shows a few of them.

This does not have:

- Robust error handling - Colorized or paginated output formatting - Most of the git log options

This does have:

- Examples of translating command line arguments to equivalent libgit2 revwalker configuration calls - Simplified options to apply pathspec limits and to show basic diffs

Members

Functions

lg2_log
int lg2_log(libgit2.types.git_repository* repo, int argc, char** argv)
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

log_options
struct log_options

log_options holds other command line options that affect log output

log_state
struct log_state

log_state represents walker being configured while handling options

Meta