libgit2.example.diff

This example demonstrates the use of the libgit2 diff APIs to create libgit2.diff.git_diff objects and display them, emulating a number of core Git diff command line options.

This covers on a portion of the core Git diff options and doesn't have particularly good error handling, but it should show most of the core libgit2 diff APIs, including various types of diffs and how to do renaming detection and patch formatting.

Members

Enums

CACHE_NORMAL
anonymousenum CACHE_NORMAL
Undocumented in source.
OUTPUT_DIFF
anonymousenum OUTPUT_DIFF
Undocumented in source.

Functions

lg2_diff
int lg2_diff(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

diff_options
struct diff_options

The 'diff_options' struct captures all the various parsed command line options.

Meta