Skip to content

Fix Git::Lib#commit_data for GPG-signed commits #610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Introduce example repo with a signed commit
Git::Lib#commit_data currently produces a malformed data hash for a
commit containing a gitsig header field, with the majority of the PGP
signature being considered part of the message.

I'd like to fix this, so this introduces a new example repo with a
single signed commit in it.

Signed-off-by: Simon Coffey <simon.coffey@futurelearn.com>
  • Loading branch information
Simon Coffey committed Jan 17, 2023
commit c96ebede87d37544ffde2dd2fc35eb5f44690989
1 change: 1 addition & 0 deletions tests/files/signed_commits/dot_git/HEAD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref: refs/heads/main
7 changes: 7 additions & 0 deletions tests/files/signed_commits/dot_git/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
Binary file added tests/files/signed_commits/dot_git/index
Binary file not shown.
1 change: 1 addition & 0 deletions tests/files/signed_commits/dot_git/logs/HEAD
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0000000000000000000000000000000000000000 a043c677c93d9f2b285771a29742cc73715e41ea Simon Coffey <simon.coffey@futurelearn.com> 1673868871 +0000 commit (initial): Signed commit
1 change: 1 addition & 0 deletions tests/files/signed_commits/dot_git/logs/refs/heads/main
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0000000000000000000000000000000000000000 a043c677c93d9f2b285771a29742cc73715e41ea Simon Coffey <simon.coffey@futurelearn.com> 1673868871 +0000 commit (initial): Signed commit
Binary file not shown.
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions tests/files/signed_commits/dot_git/refs/heads/main
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
a043c677c93d9f2b285771a29742cc73715e41ea
1 change: 1 addition & 0 deletions tests/files/signed_commits/notes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it is very important that changes to this file are verified