From: Junio C Hamano Date: Mon, 20 Feb 2012 08:14:50 +0000 (-0800) Subject: Merge branch 'cb/receive-pack-keep-errors' X-Git-Tag: v1.7.10-rc0~73 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=13dd790bbe658e03e429d91b8babe3a284663d6e;p=git.git Merge branch 'cb/receive-pack-keep-errors' * cb/receive-pack-keep-errors: do not override receive-pack errors --- 13dd790bbe658e03e429d91b8babe3a284663d6e diff --cc builtin/receive-pack.c index fa7448be5,798dca95f..0afb8b289 --- a/builtin/receive-pack.c +++ b/builtin/receive-pack.c @@@ -714,12 -699,17 +718,18 @@@ static void execute_commands(struct com check_aliased_updates(commands); - head_name = resolve_ref("HEAD", sha1, 0, NULL); + 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)