Croway commented on code in PR #21581:
URL: https://github.com/apache/camel/pull/21581#discussion_r2841742896
##########
components/camel-git/src/main/docs/git-component.adoc:
##########
@@ -75,6 +75,18 @@ from("git:///tmp/testRepo?type=commit")
.to(....)
---------------------------------------
+=== Shallow Clone
+
+Use the `depth` option to perform a shallow clone, fetching only a limited
number of commits. This reduces clone time and disk usage for large
repositories when full history is not needed.
+
+[source,java]
+---------------------------------------
+from("direct:clone")
+
.to("git:///tmp/myRepo?operation=clone&remotePath=https://github.com/example/repo.git&depth=1");
+---------------------------------------
+
+A `depth` of 1 fetches only the latest commit. When set to 0 or omitted, a
full clone is performed.
Review Comment:
when depth is omitted, `private int depth;` defaults to 0, therefore, it
should be correct, am I missing something?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]