set diff options
authorHiltjo Posthuma <hiltjo@codemadness.org>
Thu, 17 Dec 2015 21:59:19 +0000 (22:59 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Thu, 17 Dec 2015 21:59:19 +0000 (22:59 +0100)
urmoms.c

index 41d4a56aeecf1653e200da14c2c5e1aa2ab25442..57b99b4510a7e2c956b0d4d41ad8522814122fdf 100644 (file)
--- a/urmoms.c
+++ b/urmoms.c
@@ -61,6 +61,7 @@ struct commitinfo *
 commitinfo_getbyoid(const git_oid *id)
 {
        struct commitinfo *ci;
+       git_diff_options opts;
        int error;
 
        if (!(ci = calloc(1, sizeof(struct commitinfo))))
@@ -88,7 +89,9 @@ commitinfo_getbyoid(const git_oid *id)
                ci->parent_tree = NULL;
        }
 
-       if ((error = git_diff_tree_to_tree(&(ci->diff), repo, ci->parent_tree, ci->commit_tree, NULL)))
+       git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION);
+       opts.flags |= GIT_DIFF_DISABLE_PATHSPEC_MATCH;
+       if ((error = git_diff_tree_to_tree(&(ci->diff), repo, ci->parent_tree, ci->commit_tree, &opts)))
                goto err;
        if (git_diff_get_stats(&(ci->stats), ci->diff))
                goto err;