aboutsummaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-12-20 13:24:12 -0800
committerJunio C Hamano <gitster@pobox.com>2011-12-20 13:24:12 -0800
commit4d466b69fe4695ffff1de1f494dada67074d2b50 (patch)
tree73d4054333adeca2fe93d8993fbfc70b249c0f06 /builtin
parent1b048b197d6c183b69ad0914da127321c1e6b6a6 (diff)
parent0074d18dc0d816f9842d3e0e1cd0b26341715b37 (diff)
downloadgit-4d466b69fe4695ffff1de1f494dada67074d2b50.tar.gz
git-4d466b69fe4695ffff1de1f494dada67074d2b50.tar.xz
Merge branch 'jc/pull-signed-tag'
* jc/pull-signed-tag: commit: do not lose mergetag header when not amending
Diffstat (limited to 'builtin')
-rw-r--r--builtin/commit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/builtin/commit.c b/builtin/commit.c
index d0f27f931..626036a17 100644
--- a/builtin/commit.c
+++ b/builtin/commit.c
@@ -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)) {