set diff options
1 files changed, 4 insertions(+), 1 deletions(-) | |||
---|---|---|---|
M | urmoms.c | +4 | -1 |
1@@ -61,6 +61,7 @@ struct commitinfo *
2 commitinfo_getbyoid(const git_oid *id)
3 {
4 struct commitinfo *ci;
5+ git_diff_options opts;
6 int error;
7
8 if (!(ci = calloc(1, sizeof(struct commitinfo))))
9@@ -88,7 +89,9 @@ commitinfo_getbyoid(const git_oid *id)
10 ci->parent_tree = NULL;
11 }
12
13- if ((error = git_diff_tree_to_tree(&(ci->diff), repo, ci->parent_tree, ci->commit_tree, NULL)))
14+ git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION);
15+ opts.flags |= GIT_DIFF_DISABLE_PATHSPEC_MATCH;
16+ if ((error = git_diff_tree_to_tree(&(ci->diff), repo, ci->parent_tree, ci->commit_tree, &opts)))
17 goto err;
18 if (git_diff_get_stats(&(ci->stats), ci->diff))
19 goto err;