diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-04-02 04:23:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-01 20:23:17 +0000 |
commit | 0db554fa634737af59613768b2e01bfe3e239e68 (patch) | |
tree | b1dbd6cfb4e06ddfd5d32fb4eea227908c26983f /modules/git/commit.go | |
parent | ca297a90fb1fec5b270fad1a3e575916510e7385 (diff) | |
download | gitea-0db554fa634737af59613768b2e01bfe3e239e68.tar.gz gitea-0db554fa634737af59613768b2e01bfe3e239e68.zip |
Refactor commit signature parser (#30228)
To make it more flexible and support SSH signature.
The existing tests are not changed, there are also tests covering
`parseTagRef` which also calls `parsePayloadSignature` now. Add some new
tests to `Test_parseTagData`
Diffstat (limited to 'modules/git/commit.go')
-rw-r--r-- | modules/git/commit.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/git/commit.go b/modules/git/commit.go index ef2676762c..5f442b0e1a 100644 --- a/modules/git/commit.go +++ b/modules/git/commit.go @@ -26,14 +26,14 @@ type Commit struct { Author *Signature Committer *Signature CommitMessage string - Signature *CommitGPGSignature + Signature *CommitSignature Parents []ObjectID // ID strings submoduleCache *ObjectCache } -// CommitGPGSignature represents a git commit signature part. -type CommitGPGSignature struct { +// CommitSignature represents a git commit signature part. +type CommitSignature struct { Signature string Payload string // TODO check if can be reconstruct from the rest of commit information to not have duplicate data } |