@@ -21,6 +21,7 @@ This tool provides a solution to the [git recursive submodules dependency proble
2121 * [ Requirements] ( #requirements )
2222 * [ Setup] ( #setup )
2323 * [ Sample] ( #sample )
24+ * [ Sample with recursion] ( #sample-with-recursion )
2425 * [ Usage] ( #usage )
2526 * [ Motivation: git submodules vs git links] ( #motivation-git-submodules-vs-git-links )
2627 * [ Git submodules management] ( #git-submodules-management )
@@ -39,7 +40,7 @@ This tool provides a solution to the [git recursive submodules dependency proble
3940# Setup
4041
4142``` shell
42- sudo pip3 install --prefix /usr/local gil
43+ pip3 install gil
4344```
4445
4546# Sample
@@ -210,6 +211,51 @@ Additionally each module can be cloned and successfully build without root
210211repository. In this case local .gitlinks file will be used to resolve all
211212dependencies!
212213
214+ #Sample with recursion
215+ If you have some repositories with cycle references, then you need to prepare
216+ a root repository and place them into it:
217+
218+ [ gil-test-root] ( https://github.com/chronoxor/gil-test-root.git ) with .gitlinks file:
219+ ```
220+ gil-test-A gil-test-A https://github.com/chronoxor/gil-test-A.git main
221+ gil-test-B gil-test-B https://github.com/chronoxor/gil-test-B.git main
222+ ```
223+
224+ [ gil-test-A] ( https://github.com/chronoxor/gil-test-A.git ) with .gitlinks file:
225+ ```
226+ gil-test-B externals/gil-test-B https://github.com/chronoxor/gil-test-B.git main
227+ ```
228+
229+ [ gil-test-B] ( https://github.com/chronoxor/gil-test-B.git ) with .gitlinks file:
230+ ```
231+ gil-test-A externals/gil-test-A https://github.com/chronoxor/gil-test-A.git main
232+ ```
233+
234+ Then you need to just clone [ gil-test-root] ( https://github.com/chronoxor/gil-test-root.git ) and run ` gil update ` and all works:
235+ ```
236+ /home/user/gil-test-root$ gil update
237+ Working path: /home/user/gil-test-root
238+ Discover git links: /home/user/gil-test-root/.gitlinks
239+ Running git clone https://github.com/chronoxor/gil-test-A.git branch "main" into /home/user/gil-test-root/gil-test-A
240+ Cloning into '/home/user/gil-test-root/gil-test-A'...
241+ remote: Enumerating objects: 6, done.
242+ remote: Counting objects: 100% (6/6), done.
243+ remote: Compressing objects: 100% (4/4), done.
244+ remote: Total 6 (delta 0), reused 6 (delta 0), pack-reused 0 (from 0)
245+ Receiving objects: 100% (6/6), done.
246+ Discover git links: /home/user/gil-test-root/gil-test-A/.gitlinks
247+ Running git clone https://github.com/chronoxor/gil-test-B.git branch "main" into /home/user/gil-test-root/gil-test-B
248+ Cloning into '/home/user/gil-test-root/gil-test-B'...
249+ remote: Enumerating objects: 3, done.
250+ remote: Counting objects: 100% (3/3), done.
251+ remote: Compressing objects: 100% (2/2), done.
252+ remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0 (from 0)
253+ Receiving objects: 100% (3/3), done.
254+ Discover git links: /home/user/gil-test-root/gil-test-B/.gitlinks
255+ Create git link: /home/user/gil-test-root/gil-test-B -> /home/user/gil-test-root/gil-test-A/externals/gil-test-B
256+ Create git link: /home/user/gil-test-root/gil-test-A -> /home/user/gil-test-root/gil-test-B/externals/gil-test-A
257+ ```
258+
213259# Usage
214260Gil (git links) tool supports the following commands:
215261```
0 commit comments