Recursive migration of a repository #14041

Closed
opened 2025-11-02 11:01:03 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @CocoXiaoLong on GitHub (Jan 24, 2025).

Feature Description

It would be great for the migrations to support "recursive migrations". As of now, the migrator only clones the repository, but not the submodules. The submodules have to be cloned from the original sources. I think it would be cool to for it to clone those too, while rewriting the .gitmodules to point to the local server.

So in short:

  • migrate repository
  • scan for submodules
  • migrate those too
  • rewrite the .gitmodules

Screenshots

No response

Originally created by @CocoXiaoLong on GitHub (Jan 24, 2025). ### Feature Description It would be great for the migrations to support "recursive migrations". As of now, the migrator only clones the repository, but not the submodules. The submodules have to be cloned from the original sources. I think it would be cool to for it to clone those too, while rewriting the `.gitmodules` to point to the local server. So in short: - [ ] migrate repository - [ ] scan for submodules - [ ] migrate those too - [ ] rewrite the `.gitmodules` ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 11:01:03 -06:00
Author
Owner

@wxiaoguang commented on GitHub (Jan 25, 2025):

It's not easy to do so because the rewriting .gitmodules causes divergence from the origin, it is not a "migration" anymore.

If you have many repositories which need to handle submodules, maybe you need to write your own tool to maintain them, but not letting Gitea to guess how to handle them.

@wxiaoguang commented on GitHub (Jan 25, 2025): It's not easy to do so because the rewriting `.gitmodules` causes divergence from the origin, it is not a "migration" anymore. If you have many repositories which need to handle submodules, maybe you need to write your own tool to maintain them, but not letting Gitea to guess how to handle them.
Author
Owner

@CocoXiaoLong commented on GitHub (Jan 25, 2025):

That's true. I haven't thought of that. Sorry for taking your time...

@CocoXiaoLong commented on GitHub (Jan 25, 2025): That's true. I haven't thought of that. Sorry for taking your time...
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#14041