summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/diff.c10
-rw-r--r--examples/log.c10
2 files changed, 10 insertions, 10 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);
diff --git a/examples/log.c b/examples/log.c
index 413c211e4..2ba5aa52a 100644
--- a/examples/log.c
+++ b/examples/log.c
@@ -184,7 +184,7 @@ static void print_commit(git_commit *commit)
static int print_diff(
const git_diff_delta *delta,
- const git_diff_range *range,
+ const git_diff_hunk *range,
char usage,
const char *line,
size_t line_len,
@@ -218,7 +218,7 @@ static int match_with_parent(
{
git_commit *parent;
git_tree *a, *b;
- git_diff_list *diff;
+ git_diff *diff;
int ndeltas;
check(git_commit_parent(&parent, commit, (size_t)i), "Get parent", NULL);
@@ -229,7 +229,7 @@ static int match_with_parent(
ndeltas = (int)git_diff_num_deltas(diff);
- git_diff_list_free(diff);
+ git_diff_free(diff);
git_tree_free(a);
git_tree_free(b);
git_commit_free(parent);
@@ -373,7 +373,7 @@ int main(int argc, char *argv[])
if (opt.show_diff) {
git_tree *a = NULL, *b = NULL;
- git_diff_list *diff = NULL;
+ git_diff *diff = NULL;
if (parents > 1)
continue;
@@ -391,7 +391,7 @@ int main(int argc, char *argv[])
check(git_diff_print_patch(diff, print_diff, NULL),
"Displaying diff", NULL);
- git_diff_list_free(diff);
+ git_diff_free(diff);
git_tree_free(a);
git_tree_free(b);
}