-
- Downloads
Fix Error 500 when repositories contain annotated tags pointing to blobs
In repositories such as https://github.com/git/git.git, annotated tags can point to blobs, not necessarily to commits. `Repository` attempts to return the tags in the order of the commit date, but if a commit is not available the previous implementation would error due to a `nil` target. This change modifies the code to use the current time if a commit is not associated with the given tag. Closes #27228
Showing
- app/models/repository.rb 12 additions, 1 deletionapp/models/repository.rb
- changelogs/unreleased/sh-fix-annotated-tags-pointing-to-blob.yml 4 additions, 0 deletions...ogs/unreleased/sh-fix-annotated-tags-pointing-to-blob.yml
- spec/models/repository_spec.rb 24 additions, 0 deletionsspec/models/repository_spec.rb
Loading
Please register or sign in to comment