X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=builtin%2Freceive-pack.c;h=0afb8b289621c419bd7472097335e4235da37d61;hb=bc62ca13c03a7f73b7091c26093c552776b749ee;hp=fa7448be5aaf9d2830168b77f9a555e9b6740993;hpb=d1168b903320fc7c2c422ed08f881379e0bd8f35;p=git.git diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c index fa7448be5..0afb8b289 100644 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@ -642,8 +642,10 @@ static void check_aliased_updates(struct command *commands) } sort_string_list(&ref_list); - for (cmd = commands; cmd; cmd = cmd->next) - check_aliased_update(cmd, &ref_list); + for (cmd = commands; cmd; cmd = cmd->next) { + if (!cmd->error_string) + check_aliased_update(cmd, &ref_list); + } string_list_clear(&ref_list, 0); } @@ -707,8 +709,10 @@ static void execute_commands(struct command *commands, const char *unpacker_erro set_connectivity_errors(commands); if (run_receive_hook(commands, pre_receive_hook, 0)) { - for (cmd = commands; cmd; cmd = cmd->next) - cmd->error_string = "pre-receive hook declined"; + for (cmd = commands; cmd; cmd = cmd->next) { + if (!cmd->error_string) + cmd->error_string = "pre-receive hook declined"; + } return; } @@ -717,9 +721,15 @@ static void execute_commands(struct command *commands, const char *unpacker_erro free(head_name_to_free); head_name = head_name_to_free = resolve_refdup("HEAD", sha1, 0, NULL); - for (cmd = commands; cmd; cmd = cmd->next) - if (!cmd->skip_update) - cmd->error_string = update(cmd); + for (cmd = commands; cmd; cmd = cmd->next) { + if (cmd->error_string) + continue; + + if (cmd->skip_update) + continue; + + cmd->error_string = update(cmd); + } } static struct command *read_head_info(void)