diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/receive-pack.c | 13 | ||||
-rw-r--r-- | builtin/shortlog.c | 1 |
2 files changed, 5 insertions, 9 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index 83492af05f..fb2a090a0c 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -1128,25 +1128,22 @@ static const char *update(struct command *cmd, struct shallow_info *si) static void run_update_post_hook(struct command *commands) { struct command *cmd; - int argc; struct child_process proc = CHILD_PROCESS_INIT; const char *hook; hook = find_hook("post-update"); - for (argc = 0, cmd = commands; cmd; cmd = cmd->next) { - if (cmd->error_string || cmd->did_not_exist) - continue; - argc++; - } - if (!argc || !hook) + if (!hook) return; - argv_array_push(&proc.args, hook); for (cmd = commands; cmd; cmd = cmd->next) { if (cmd->error_string || cmd->did_not_exist) continue; + if (!proc.args.argc) + argv_array_push(&proc.args, hook); argv_array_push(&proc.args, cmd->ref_name); } + if (!proc.args.argc) + return; proc.no_stdin = 1; proc.stdout_to_stderr = 1; diff --git a/builtin/shortlog.c b/builtin/shortlog.c index f78bb4818d..7cff1839fc 100644 --- a/builtin/shortlog.c +++ b/builtin/shortlog.c @@ -149,7 +149,6 @@ void shortlog_add_commit(struct shortlog *log, struct commit *commit) ctx.fmt = CMIT_FMT_USERFORMAT; ctx.abbrev = log->abbrev; ctx.print_email_subject = 1; - ctx.after_subject = ""; ctx.date_mode.type = DATE_NORMAL; ctx.output_encoding = get_log_output_encoding(); |