Skip to content

Support native project cloning#53

Open
adrianschroeter wants to merge 1 commit into
openSUSE:mainfrom
adrianschroeter:native_project_clone
Open

Support native project cloning#53
adrianschroeter wants to merge 1 commit into
openSUSE:mainfrom
adrianschroeter:native_project_clone

Conversation

@adrianschroeter
Copy link
Copy Markdown
Member

Esp. for osc, we support here "onlybuild" parameters now. So we support faster checkouts of :PullRequest: projects.

Usually we want a project git cloned, but only the submodules initialized which are providing the package source for the packages listed (if there are onlybuild arguments).

This is triggered via new --native-projectmode switch. It takes any argument to enable, when setting it to 'recursive' it will also clone all submodules and assets recursively.

Esp. for osc, we support here "onlybuild" parameters now. So we support
faster checkouts of :PullRequest: projects.

Usually we want a project git cloned, but only the submodules
initialized which are providing the package source for the packages
listed (if there are onlybuild arguments).

This is triggered via new --native-projectmode switch. It takes
any argument to enable, when setting it to 'recursive' it will
also clone all submodules and assets recursively.
@adrianschroeter
Copy link
Copy Markdown
Member Author

Daniel has prepared a PR for osc using it here: : openSUSE/osc#2136

@dmach you will need to use the new --native-projectmode switch instead.

@adrianschroeter adrianschroeter requested a review from mlschroe May 6, 2026 14:31
@adrianschroeter adrianschroeter force-pushed the native_project_clone branch from 3583dbe to c94822f Compare May 6, 2026 14:31
Comment thread obs_scm_bridge
Comment on lines +913 to +914
parser.add_argument('--native-projectmode',
help='clone the project git without submodules. set it to recursive if you want all submodule sources')
Copy link
Copy Markdown
Contributor

@dmach dmach May 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to specify choices such as choices=['recursive', 'normal'].
I made normal up, maybe you have a better word for it.

BTW, how should I use it in obs? With recursive or without?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'recursive' and 'flat' maybe ... good idea. Maybe even a third option "empty" to skip submodule cloning complete.
git-obs you mean? Good question, very large projects should maybe cloned only 'empty' by default, but this is a bit of a heuristic.

'recursive' should be only optional IMHO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants