diff options
author | Russell Belfer <rb@github.com> | 2013-10-11 14:51:54 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-10-11 14:51:54 -0700 |
commit | 3ff1d123736e5686fb9ec16e65828d5b8ffa2b30 (patch) | |
tree | 05c6baebe50c590008f91cf7d56732f52ca8ef66 /examples/diff.c | |
parent | 743531372a00e41246026910e2361684e2aad59f (diff) | |
download | libgit2-3ff1d123736e5686fb9ec16e65828d5b8ffa2b30.tar.gz |
Rename diff objects and split patch.h
This makes no functional change to diff but renames a couple of
the objects and splits the new git_patch (formerly git_diff_patch)
into a new header file.
Diffstat (limited to 'examples/diff.c')
-rw-r--r-- | examples/diff.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/diff.c b/examples/diff.c index 11efa21ec..3200b53c8 100644 --- a/examples/diff.c +++ b/examples/diff.c @@ -45,7 +45,7 @@ char *colors[] = { static int printer( const git_diff_delta *delta, - const git_diff_range *range, + const git_diff_hunk *range, char usage, const char *line, size_t line_len, @@ -126,7 +126,7 @@ int main(int argc, char *argv[]) git_tree *t1 = NULL, *t2 = NULL; git_diff_options opts = GIT_DIFF_OPTIONS_INIT; git_diff_find_options findopts = GIT_DIFF_FIND_OPTIONS_INIT; - git_diff_list *diff; + git_diff *diff; int i, color = -1, format = FORMAT_PATCH, cached = 0; char *a, *treeish1 = NULL, *treeish2 = NULL; const char *dir = "."; @@ -218,11 +218,11 @@ int main(int argc, char *argv[]) else if (t1 && cached) check(git_diff_tree_to_index(&diff, repo, t1, NULL, &opts), "Diff"); else if (t1) { - git_diff_list *diff2; + git_diff *diff2; check(git_diff_tree_to_index(&diff, repo, t1, NULL, &opts), "Diff"); check(git_diff_index_to_workdir(&diff2, repo, NULL, &opts), "Diff"); check(git_diff_merge(diff, diff2), "Merge diffs"); - git_diff_list_free(diff2); + git_diff_free(diff2); } else if (cached) { check(resolve_to_tree(repo, "HEAD", &t1), "looking up HEAD"); @@ -253,7 +253,7 @@ int main(int argc, char *argv[]) if (color >= 0) fputs(colors[0], stdout); - git_diff_list_free(diff); + git_diff_free(diff); git_tree_free(t1); git_tree_free(t2); git_repository_free(repo); |