From: Junio C Hamano Date: Tue, 21 Feb 2012 23:14:41 +0000 (-0800) Subject: Merge branch 'cb/receive-pack-keep-errors' into maint X-Git-Tag: v1.7.9.2~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e147e9693ace9f7c6dafd4095d3cde80d047e787;p=git.git Merge branch 'cb/receive-pack-keep-errors' into maint * cb/receive-pack-keep-errors: do not override receive-pack errors --- e147e9693ace9f7c6dafd4095d3cde80d047e787 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)