Appease Sun Studio by renaming "tmpfile"
[gitweb.git] / builtin / commit.c
index 039c04fe9dbbeb4bea15a383f55c23c8c4e60f78..626036a179e1476ee28a9f2ff32fedc5b97dc5d0 100644 (file)
@@ -1304,7 +1304,7 @@ static void print_summary(const char *prefix, const unsigned char *sha1,
        rev.diffopt.break_opt = 0;
        diff_setup_done(&rev.diffopt);
 
-       head = resolve_ref("HEAD", junk_sha1, 0, NULL);
+       head = resolve_ref_unsafe("HEAD", junk_sha1, 0, NULL);
        printf("[%s%s ",
                !prefixcmp(head, "refs/heads/") ?
                        head + 11 :
@@ -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)) {