SIGN IN SIGN UP

Recursively clone submodules in templates (#230)

* Add necessary changes for template submodules

Template repositories will, as of now, be cloned with
`--recurse-submodules` which means that submodules are
incorporated when initializing cookiecutter templates
with `cruft create`.

To consider submodules in `update` and `diff` we need
to update all submodules (recursively) alongside
to the `git reset` when comparing two template trees.

* Unit tests for update/create/diff with submodules

This is based on the template repository [1] which
references the git submodule [2].

The template structure is therefore:

    pkg_{{cookiecutter.name}}
    |
    |`- submodule (points to [2])
    | |
    | `- test-file
    |
    `- main-file

[1]: https://github.com/ottonemo/cookiecutter-test-submodules
[2]: https://github.com/ottonemo/cookiecutter-test-submodule

* Apply formatting

* Fix submodule checkout for branches

---------

Co-authored-by: Sambhav Kothari <sambhavs.email@gmail.com>
O
ottonemo committed
4b8e190683e0ebf31cab8c08e9bc9f91b32db32b
Parent: 79affbf
Committed by GitHub <noreply@github.com> on 12/25/2024, 12:47:11 PM