diff options
author | Junio C Hamano <gitster@pobox.com> | 2019-07-25 21:27:08 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-07-25 21:27:08 (GMT) |
commit | 518e8748979dbe485f519d0f63c3642cc1643f79 (patch) | |
tree | faabd0748cbacbfc92946209e5aeceb9a20884d3 | |
parent | 90891c6a0a7f9fd575f755dcb1b1e5cc067fc4ed (diff) | |
parent | de99eb0c24d96730de187edd37b9ca9d42b0b05d (diff) | |
download | git-518e8748979dbe485f519d0f63c3642cc1643f79.zip git-518e8748979dbe485f519d0f63c3642cc1643f79.tar.gz git-518e8748979dbe485f519d0f63c3642cc1643f79.tar.bz2 |
Merge branch 'es/grep-require-name-when-needed' into maint
More parameter validation.
* es/grep-require-name-when-needed:
grep: fail if call could output and name is null
-rw-r--r-- | grep.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1780,6 +1780,10 @@ static int grep_source_1(struct grep_opt *opt, struct grep_source *gs, int colle enum grep_context ctx = GREP_CONTEXT_HEAD; xdemitconf_t xecfg; + if (!opt->status_only && gs->name == NULL) + BUG("grep call which could print a name requires " + "grep_source.name be non-NULL"); + if (!opt->output) opt->output = std_output; |