Skip to content

Commit 25f9ade

Browse files
committed
replay: do not copy gpgsign-sha256 header
When "git replay" replays a commit it copies the extended headers across from the original commit. However, if the original commit was signed we do not want to copy the header associated with the signature is it wont be valid for the new commit. The code already knows to avoid coping the "gpgsig" header but does not know to avoid copying the "gpgsig-sha256" header. Add that header to the list of exclusions to match what "git commit --amend" does. Signed-off-by: Phillip Wood <[email protected]>
1 parent 9a2fb14 commit 25f9ade

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/replay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static struct commit *create_commit(struct repository *repo,
6767
const char *message = repo_logmsg_reencode(repo, based_on,
6868
NULL, out_enc);
6969
const char *orig_message = NULL;
70-
const char *exclude_gpgsig[] = { "gpgsig", NULL };
70+
const char *exclude_gpgsig[] = { "gpgsig", "gpgsig-sha256", NULL };
7171

7272
commit_list_insert(parent, &parents);
7373
extra = read_commit_extra_headers(based_on, exclude_gpgsig);

0 commit comments

Comments
 (0)