mv: move submodules together with their work trees
[gitweb.git] / combine-diff.c
index 3e8bb17831aa5f2f39ee3a07eeebdda90ae39556..c973f5d07ec70d3c6b86defc3e1421ed2ea6673b 100644 (file)
@@ -1305,6 +1305,7 @@ void diff_tree_combined(const unsigned char *sha1,
        int i, num_paths, needsep, show_log_first, num_parent = parents->nr;
 
        diffopts = *opt;
+       copy_pathspec(&diffopts.pathspec, &opt->pathspec);
        diffopts.output_format = DIFF_FORMAT_NO_OUTPUT;
        DIFF_OPT_SET(&diffopts, RECURSIVE);
        DIFF_OPT_CLR(&diffopts, ALLOW_EXTERNAL);
@@ -1375,6 +1376,8 @@ void diff_tree_combined(const unsigned char *sha1,
                paths = paths->next;
                free(tmp);
        }
+
+       free_pathspec(&diffopts.pathspec);
 }
 
 void diff_tree_combined_merge(const struct commit *commit, int dense,