Skip to content

Commit

Permalink
Merge branch 'jc/pull-signed-tag'
Browse files Browse the repository at this point in the history
* jc/pull-signed-tag:
  commit: do not lose mergetag header when not amending
  • Loading branch information
Junio C Hamano committed Dec 20, 2011
2 parents 1b048b1 + 0074d18 commit 4d466b6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion builtin/commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,8 +1485,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)) {
Expand Down

0 comments on commit 4d466b6

Please sign in to comment.