Re: [PATCH v3 23/24] merge-recursive: add sanity checks for relevant merge_options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 16, 2019, 19:52 UTC
- Message-ID
- <xmqqd0h428ig.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190815214053.16594-24-newren@gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 6 quoted lines
> There are lots of options that callers can set, yet most have a limited > range of valid values, some options are meant for output (e.g. > opt->obuf, which is expected to start empty), and callers are expected > to not set opt->priv. Add several sanity checks to ensure callers > provide sane values. > ...
The change to the struct does not seem to have much with the above rationale.
Show 10 quoted lines
> diff --git a/merge-recursive.h b/merge-recursive.h
> index 978847e672..d201ee80fb 100644
> --- a/merge-recursive.h
> +++ b/merge-recursive.h
> @@ -27,7 +27,7 @@ struct merge_options {
> } detect_directory_renames;
> int rename_limit;
> int rename_score;
> - int show_rename_progress;
> + int show_rename_progress : 1;And a one-bit wide bitfield that is signed is always an iffy idea.
> > /* xdiff-related options (patience, ignore whitespace, ours/theirs) */ > long xdl_opts;