Skip to content

Commit 4d466b6

Browse files
committed
Merge branch 'jc/pull-signed-tag'
* jc/pull-signed-tag: commit: do not lose mergetag header when not amending
2 parents 1b048b1 + 0074d18 commit 4d466b6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

builtin/commit.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1485,8 +1485,12 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
14851485
exit(1);
14861486
}
14871487

1488-
if (amend)
1488+
if (amend) {
14891489
extra = read_commit_extra_headers(current_head);
1490+
} else {
1491+
struct commit_extra_header **tail = &extra;
1492+
append_merge_tag_headers(parents, &tail);
1493+
}
14901494

14911495
if (commit_tree_extended(sb.buf, active_cache_tree->sha1, parents, sha1,
14921496
author_ident.buf, extra)) {

0 commit comments

Comments
 (0)