Skip to content

Relative image link on different branch broken for github migrations / mirrors #25632

Closed
@throwabird

Description

Description

When migrating a repository from GitHub to Gitea. Links to an image in the README of the main branch that reference an image located on another branch don't link correctly on Gitea.

For Example: https://github.com/hlissner/dotfiles references images in the README that are located on the screenshots branch. After the migration they don't render correctly on the Gitea repository. See https://try.gitea.io/oonguphuu5og3OovishooVie/master.

The failures in the log during the migration:

...eb/routing/logger.go:102:func1() [I] router: completed GET /REDACTED/master for REDACTED, 200 OK in 71.8ms @ repo/view.go:710(repo.Home)
...eb/routing/logger.go:102:func1() [I] router: completed GET /screenshots/alucard/fakebusy.png for REDACTED, 404 Not Found in 1.5ms @ web/goget.go:20(web.goGet)
...eb/routing/logger.go:102:func1() [I] router: completed GET /screenshots/alucard/desktop.png for REDACTED, 404 Not Found in 1.6ms @ web/goget.go:20(web.goGet)
...eb/routing/logger.go:102:func1() [I] router: completed GET /screenshots/alucard/rofi.png for REDACTED, 404 Not Found in 1.7ms @ web/goget.go:20(web.goGet)
...eb/routing/logger.go:102:func1() [I] router: completed GET /screenshots/alucard/tiling.png for REDACTED, 404 Not Found in 1.8ms @ web/goget.go:20(web.goGet)

Gitea Version

1.20.0+rc2

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

image

Git Version

Try Gitea version

Operating System

Docker

How are you running Gitea?

https://try.gitea.io/ and Docker version

Database

SQLite

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions