Merge branch 'rs/dup-array'

Code cleaning.

* rs/dup-array:
  use DUP_ARRAY
  add DUP_ARRAY
  do full type check in BARF_UNLESS_COPYABLE
  factor out BARF_UNLESS_COPYABLE
  mingw: make argv2 in try_shell_exec() non-const
This commit is contained in:
Junio C Hamano
2023-01-21 17:21:58 -08:00
9 changed files with 30 additions and 23 deletions

View File

@ -1492,8 +1492,7 @@ static int run_apply(const struct am_state *state, const char *index_file)
* apply_opts.v keeps referencing the allocated strings for
* strvec_clear() to release.
*/
ALLOC_ARRAY(apply_argv, apply_opts.nr);
COPY_ARRAY(apply_argv, apply_opts.v, apply_opts.nr);
DUP_ARRAY(apply_argv, apply_opts.v, apply_opts.nr);
opts_left = apply_parse_options(apply_opts.nr, apply_argv,
&apply_state, &force_apply, &options,