Code

commit --amend -S: strip existing gpgsig headers
[git.git] / builtin / commit.c
index fa41ec8c878a6af63e17b79996148be85dcfccef..970a83662a67a8f1c6cb8a67fd2e6636a5260948 100644 (file)
@@ -1494,7 +1494,8 @@ int cmd_commit(int argc, const char **argv, const char *prefix)
        }
 
        if (amend) {
-               extra = read_commit_extra_headers(current_head);
+               const char *exclude_gpgsig[2] = { "gpgsig", NULL };
+               extra = read_commit_extra_headers(current_head, exclude_gpgsig);
        } else {
                struct commit_extra_header **tail = &extra;
                append_merge_tag_headers(parents, &tail);