summaryrefslogtreecommitdiff
path: root/combine-diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'combine-diff.c')
-rw-r--r--combine-diff.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/combine-diff.c b/combine-diff.c
index 77d7872..6dc0609 100644
--- a/combine-diff.c
+++ b/combine-diff.c
@@ -518,8 +518,11 @@ static int give_context(struct sline *sline, unsigned long cnt, int num_parent)
unsigned long k;
/* Paint a few lines before the first interesting line. */
- while (j < i)
- sline[j++].flag |= mark | no_pre_delete;
+ while (j < i) {
+ if (!(sline[j].flag & mark))
+ sline[j].flag |= no_pre_delete;
+ sline[j++].flag |= mark;
+ }
again:
/* we know up to i is to be included. where does the
@@ -1302,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;
+ diff_tree_setup_paths(diffopts.pathspec.raw, &diffopts);
diffopts.output_format = DIFF_FORMAT_NO_OUTPUT;
DIFF_OPT_SET(&diffopts, RECURSIVE);
DIFF_OPT_CLR(&diffopts, ALLOW_EXTERNAL);
@@ -1372,6 +1376,8 @@ void diff_tree_combined(const unsigned char *sha1,
paths = paths->next;
free(tmp);
}
+
+ diff_tree_release_paths(&diffopts);
}
void diff_tree_combined_merge(const struct commit *commit, int dense,