author | Junio C Hamano <gitster@pobox.com> | |
Mon, 20 Feb 2012 08:14:50 +0000 (00:14 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 20 Feb 2012 08:14:50 +0000 (00:14 -0800) |
* cb/receive-pack-keep-errors:
do not override receive-pack errors
do not override receive-pack errors
1 | 2 | |||
---|---|---|---|---|
builtin/receive-pack.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc builtin/receive-pack.c
index fa7448be5aaf9d2830168b77f9a555e9b6740993,798dca95f63ddb97032049b52216c1b45200d337..0afb8b289621c419bd7472097335e4235da37d61
+++ b/builtin/receive-pack.c
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)