提交 0074d18d 编写于 作者: J Junio C Hamano

commit: do not lose mergetag header when not amending

The earlier ed7a42a0 (commit: teach --amend to carry forward extra headers,
2011-11-08) broke "git merge/pull; edit to fix conflict; git commit"
workflow by forgetting that commit_tree_extended() takes the whole extra
header list.
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 96b8d93a
......@@ -1484,8 +1484,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
exit(1);
}
if (amend)
if (amend) {
extra = read_commit_extra_headers(current_head);
} else {
struct commit_extra_header **tail = &extra;
append_merge_tag_headers(parents, &tail);
}
if (commit_tree_extended(sb.buf, active_cache_tree->sha1, parents, sha1,
author_ident.buf, extra)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册