]> source.dussan.org Git - gitea.git/commit
Tagger can be empty, as can Commit and Author - tolerate this (#15835)
authorzeripath <art27@cantab.net>
Wed, 12 May 2021 05:11:42 +0000 (06:11 +0100)
committerGitHub <noreply@github.com>
Wed, 12 May 2021 05:11:42 +0000 (01:11 -0400)
commit2a565478d17f4a1b59a77b0e2251dd7b7de862c4
treee300874a9199a9579767e0477d55a53c21d56d45
parent3d7d750a999b72d422000154a0b1f2801614521e
Tagger can be empty, as can Commit and Author - tolerate this (#15835)

Unfortunately some old repositories can have tags with empty Tagger, Commit
or Author. Go-Git variants will always have empty values for these whereas
the native git variant leaves them at nil. The simplest solution is just to
always have these set to empty Signatures.

v156 migration also makes the incorrect assumption that these cannot be empty.
Therefore add some handling to this and add logging and adjust broken
logging elsewhere in this migration.

Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
models/migrations/v156.go
modules/git/commit_reader.go
modules/git/tag.go