Skip to content
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

Support for "templated" workspace creation #1319

Open
GeorgeLyon opened this issue Mar 15, 2024 · 0 comments
Open

Support for "templated" workspace creation #1319

GeorgeLyon opened this issue Mar 15, 2024 · 0 comments

Comments

@GeorgeLyon
Copy link

It would be cool if you could have a template for creating a new workspace, using which could be as easy as git clone http://josh/central.git:workspace-from-template=path/to/template-spec/new-module-name. This would be useful for situations where a project has many similarly-structured modules, like screens of an app or handles of a server process.

For a bit more detail, imagine a project with the following structure:

<root>
  ├─ Project.project-file
  ╰┬ Submodules
   ├┬─ josh-template
   │├── workspace.josh
   │╰── %josh-template%.subproject-file
   ├┬─ Submodule A
   │├── workspace.josh
   │├── SubmoduleA.subproject-file
   │╰┈
   ╰┬─ Submodule B
    ├── workspace.josh
    ├── SubmoduleB.subproject-file
    ╰┈

It would be cool if we could "clone" SubmoduleC and have josh create the subdirectory structure for us from josh-template (possibly as simple as replacing instances of %josh-template% in file names and contents, but maybe more configurable). Without this functionality, the only thing to do would be to clone the whole repo, or have a special "Create a new submodule" workspace.

The creation operation probably shouldn't commit to the repo, so it may make sense to piggy-back on another git clone argument: (maybe something -b josh-create-from-template:<branch-name>)

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

No branches or pull requests

1 participant