stagit
static git repository generator
git clone https://9o.is/git/stagit.git
commit 8fccbca8b8c08d7e94db7d08747234389a8ebf68 parent 395703b11ff6cfbeba1d450c52a28e21c1713599 Author: Hiltjo Posthuma <hiltjo@codemadness.org> Date: Thu, 17 Dec 2015 22:59:19 +0100 set diff options Diffstat:
| M | urmoms.c | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git 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;