process: allow NULL options

The process options structure should be allowed to be `NULL`; treated as
if it's empty.
This commit is contained in:
Edward Thomson
2026-05-11 21:45:52 +01:00
parent 353e7059dc
commit 0239d68bb2

View File

@@ -204,7 +204,9 @@ extern int git_process_new_from_cmdline(
{
git_process_options merged_opts = {0};
if (opts)
memcpy(&merged_opts, opts, sizeof(git_process_options));
merged_opts.use_shell = 1;
return git_process_new(out, &cmdline, 1, env, env_len, &merged_opts);