summaryrefslogtreecommitdiff
path: root/examples/diff.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2012-11-15 10:18:25 -0800
committerVicent Martí <vicent@github.com>2012-11-15 10:18:25 -0800
commit63f7c6f4c8730e6ce1447a1c8b02c23c23d9682b (patch)
tree61f442146ed5b98352016f4ecec3ac4736e10c8c /examples/diff.c
parent5a36f127808c7b470eef17b1a8a130dde0cc64a1 (diff)
parentbbe6dbec81d2050fb52b600bc27e2dacdc780e77 (diff)
downloadlibgit2-63f7c6f4c8730e6ce1447a1c8b02c23c23d9682b.tar.gz
Merge pull request #1072 from arrbee/diff-api-signatures
Diff API signatures
Diffstat (limited to 'examples/diff.c')
-rw-r--r--examples/diff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/diff.c b/examples/diff.c
index 31ebf6bfb..38231d219 100644
--- a/examples/diff.c
+++ b/examples/diff.c
@@ -204,22 +204,22 @@ int main(int argc, char *argv[])
/* nothing */
if (t1 && t2)
- check(git_diff_tree_to_tree(repo, &opts, t1, t2, &diff), "Diff");
+ check(git_diff_tree_to_tree(&diff, repo, t1, t2, &opts), "Diff");
else if (t1 && cached)
- check(git_diff_index_to_tree(repo, &opts, t1, &diff), "Diff");
+ check(git_diff_index_to_tree(&diff, repo, t1, NULL, &opts), "Diff");
else if (t1) {
git_diff_list *diff2;
- check(git_diff_index_to_tree(repo, &opts, t1, &diff), "Diff");
- check(git_diff_workdir_to_index(repo, &opts, &diff2), "Diff");
+ check(git_diff_index_to_tree(&diff, repo, t1, NULL, &opts), "Diff");
+ check(git_diff_workdir_to_index(&diff2, repo, NULL, &opts), "Diff");
check(git_diff_merge(diff, diff2), "Merge diffs");
git_diff_list_free(diff2);
}
else if (cached) {
check(resolve_to_tree(repo, "HEAD", &t1), "looking up HEAD");
- check(git_diff_index_to_tree(repo, &opts, t1, &diff), "Diff");
+ check(git_diff_index_to_tree(&diff, repo, t1, NULL, &opts), "Diff");
}
else
- check(git_diff_workdir_to_index(repo, &opts, &diff), "Diff");
+ check(git_diff_workdir_to_index(&diff, repo, NULL, &opts), "Diff");
if (color >= 0)
fputs(colors[0], stdout);