google / copybara

Copybara: A tool for transforming and moving code between repositories.
Apache License 2.0
2.11k stars 251 forks source link

Submodules appear as regular directories #269

Open ov-wagle opened 9 months ago

ov-wagle commented 9 months ago
core.workflow(
    name = "default",
    origin = git.origin(
      ...
      submodules = "RECURSIVE",
      ...
    ),
    destination = git.destination(
        ...
    ),

    destination_files = glob(["**"]),
    origin_files = glob(["**"]),

    authoring = authoring.pass_thru("Email"),
)

I have a module having various submodules in it. I am using copybara to copybara non IP code to the public repository. However, when I run the tool, my submodule gets copied as a normal directory rather than getting copied as submodule.

hsudhof commented 9 months ago

Copybara materializes submodules, it does not currently support to create submodules in the destination with core.workflow. This is because submodules are git specific and wouldn't transfer to other SCMs.