Updating a subproject within an existing Git repo #449
Replies: 3 comments 4 replies
-
|
+1 for this request. We want to use copier on a repo with multiple answer files in subfolders. Also, we want to use copier on a large monorepo, but the fetch that copier does for this case is too slow. |
Beta Was this translation helpful? Give feedback.
-
|
Hi there, all you need to do is put your Docs: https://copier.readthedocs.io/en/latest/configuring/#subdirectory (beware: docs for master, this feature changed from latest v5.x) |
Beta Was this translation helpful? Give feedback.
-
|
I put a PR up here #452 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a Git repo at
~/repo. I have another Git repo at~/my_copier_template. I tellcopierto use~/my_copier_templateto generate a subproject at~/repo/path/to/S(call it S for short). I track my new subproject in~/repoby adding and committing the changes.When I try to update S, it fails at:
copier/copier/main.py
Lines 607 to 610 in b8ff4d8
This is because
copierassumes that a subproject is tracked by Git if and only if it is in the root of a git repo, as stated here:copier/copier/subproject.py
Lines 77 to 80 in b8ff4d8
But, S is not at the root of
~/repo. I would like to change copier to support this scenario, but wanted to get some thoughts before proceeding.Part of the change will involve changing how we update:
copier/copier/main.py
Lines 670 to 673 in b8ff4d8
How do we feel about not doing the
fetch, and doing agit diffbetween R:/path/to/Sand the cleanly generated T, instead ofgit diff-tree.Beta Was this translation helpful? Give feedback.
All reactions