*/
static int run_git_commit(const char *defmsg, struct replay_opts *opts)
{
- /* 6 is max possible length of our args array including NULL */
- const char *args[6];
+ /* 7 is max possible length of our args array including NULL */
+ const char *args[7];
int i = 0;
args[i++] = "commit";
args[i++] = "-F";
args[i++] = defmsg;
}
+ if (opts->allow_empty)
+ args[i++] = "--allow-empty";
+
args[i] = NULL;
return run_command_v_opt(args, RUN_GIT_CMD);