From c0574f95db5a9770e5439411468bcba99f628241 Mon Sep 17 00:00:00 2001 From: Andrew Oberstar Date: Fri, 21 Apr 2023 18:43:06 -0500 Subject: [PATCH] Document fetch depth --- docs/modules/ROOT/pages/grgit-clone.adoc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/grgit-clone.adoc b/docs/modules/ROOT/pages/grgit-clone.adoc index fbb7a9f2..0f5e68ee 100644 --- a/docs/modules/ROOT/pages/grgit-clone.adoc +++ b/docs/modules/ROOT/pages/grgit-clone.adoc @@ -10,7 +10,7 @@ grgit-clone - Clone a repository into a new directory ---- Grgit.clone(dir: , uri: , remote: , all: , bare: , branches: , checkout: , - refToCheckout: , credentials: ) + refToCheckout: , depth: , credentials: ) ---- [source, groovy] @@ -24,6 +24,7 @@ Grgit.clone { branches = checkout = refToCheckout = + depth = credentials = } ---- @@ -48,6 +49,7 @@ bare:: (`boolean`, default `false`) Create a bare repository. branches:: (`List`, `[]`) Select full refs to use with `all = false`. checkout:: (`boolean`, default `true`) Set to `false` to skip checking out a `HEAD`. refToCheckout:: (`String`, default `null`) Instead of pointing the newly created `HEAD` to the branch pointed to by the cloned repository’s `HEAD`, point to `` branch instead. In a non-bare repository, this is the branch that will be checked out. This can also take tags and detaches the `HEAD` at that commit in the resulting repository. +depth:: (`Integer`, default `null`) If set, does a shallow clone to the specified depth credentials:: (`Credentials`, default `null`) An instance of link:https://github.com/ajoberstar/grgit/blob/{page-component-version}/grgit-core/src/main/groovy/org/ajoberstar/grgit/Credentials.groovy[Credentials] containing username/password to be used in operations that require authentication. See xref:grgit-authentication.adoc[grgit-authentication] for preferred ways to configure this. == Examples