]> git.armaanb.net Git - stagit.git/commitdiff
detect filetype changes in diff (for example a normal file to symlink)
authorHiltjo Posthuma <hiltjo@codemadness.org>
Sun, 18 Nov 2018 17:06:41 +0000 (18:06 +0100)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Sun, 18 Nov 2018 17:06:41 +0000 (18:06 +0100)
stagit.c

index f43801db0fbe0f2bd4be113a89cc20884417589f..8a7e7fc4d5c02bc6ba6bacb8e981058f8833b789 100644 (file)
--- a/stagit.c
+++ b/stagit.c
@@ -114,7 +114,9 @@ commitinfo_getstats(struct commitinfo *ci)
        }
 
        git_diff_init_options(&opts, GIT_DIFF_OPTIONS_VERSION);
-       opts.flags |= GIT_DIFF_DISABLE_PATHSPEC_MATCH;
+       opts.flags |= GIT_DIFF_DISABLE_PATHSPEC_MATCH |
+                     GIT_DIFF_IGNORE_SUBMODULES |
+                     GIT_DIFF_INCLUDE_TYPECHANGE;
        if (git_diff_tree_to_tree(&(ci->diff), repo, ci->parent_tree, ci->commit_tree, &opts))
                goto err;