Skip to content

Submodules in Templates Aren't Added to Generated Repositories #32970

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
vingenuity opened this issue Dec 24, 2024 · 0 comments · Fixed by #16237
Closed

Submodules in Templates Aren't Added to Generated Repositories #32970

vingenuity opened this issue Dec 24, 2024 · 0 comments · Fixed by #16237
Labels

Comments

@vingenuity
Copy link

Description

If you create a template repository containing a submodule, any repositories created from that template do not have the submodule added to it. Specifically, while the ".gitmodules" file is added to the created repository, the submodule object for the folder does not. This means that calls to git submodule init or similar will not work.

My expectation would be that the created repository from the template would contain either a copy of the submodule within it, or a newly generated submodule object. This would allow the cloning developer to use git clone --recurse-submodules to fully create the repository in one go.

I have created an example repository on the Gitea demo site here: https://demo.gitea.com/Vingenuity/submodule-templated-repository demonstrating this issue.

NOTE: This is a different issue from #10316, which is about templates of templates.

Gitea Version

1.22.6

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

Unraid

How are you running Gitea?

I am running the official gitea Docker container via Unraid.

Database

None

@wxiaoguang wxiaoguang linked a pull request Dec 31, 2024 that will close this issue
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Apr 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant