diff options
Diffstat (limited to 'combine-diff.c')
| -rw-r--r-- | combine-diff.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/combine-diff.c b/combine-diff.c index d93782daeb..1a39b5dde0 100644 --- a/combine-diff.c +++ b/combine-diff.c @@ -195,10 +195,10 @@ static struct lline *coalesce_lines(struct lline *base, int *lenbase, struct lline *baseend, *newend = NULL; int i, j, origbaselen = *lenbase; - if (newline == NULL) + if (!newline) return base; - if (base == NULL) { + if (!base) { *lenbase = lennew; return newline; } @@ -372,7 +372,7 @@ struct combine_diff_state { static void consume_hunk(void *state_, long ob, long on, long nb, long nn, - const char *funcline, long funclen) + const char *func UNUSED, long funclen UNUSED) { struct combine_diff_state *state = state_; @@ -1498,6 +1498,13 @@ void diff_tree_combined(const struct object_id *oid, int i, num_paths, needsep, show_log_first, num_parent = parents->nr; int need_generic_pathscan; + if (opt->ignore_regex_nr) + die("combined diff and '%s' cannot be used together", + "--ignore-matching-lines"); + if (opt->close_file) + die("combined diff and '%s' cannot be used together", + "--output"); + /* nothing to do, if no parents */ if (!num_parent) return; |
