summaryrefslogtreecommitdiffstats
path: root/contrib/scalar/scalar.txt
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2021-12-03 14:34:24 +0100
committerJunio C Hamano <gitster@pobox.com>2021-12-05 06:52:24 +0100
commit4368e40befd308d3055e81f8f6aaaa3fb8fe6407 (patch)
tree51ded11f2432fb410e5f5ab69e1154b77c2a9cd0 /contrib/scalar/scalar.txt
parentscalar: implement the `clone` subcommand (diff)
downloadgit-4368e40befd308d3055e81f8f6aaaa3fb8fe6407.tar.xz
git-4368e40befd308d3055e81f8f6aaaa3fb8fe6407.zip
scalar: teach 'clone' to support the --single-branch option
Just like `git clone`, the `scalar clone` command now also offers to restrict the clone to a single branch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/scalar/scalar.txt')
-rw-r--r--contrib/scalar/scalar.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/scalar/scalar.txt b/contrib/scalar/scalar.txt
index e8730967f1..56f744a4aa 100644
--- a/contrib/scalar/scalar.txt
+++ b/contrib/scalar/scalar.txt
@@ -8,7 +8,7 @@ scalar - an opinionated repository management tool
SYNOPSIS
--------
[verse]
-scalar clone [--branch <main-branch>] [--full-clone] <url> [<enlistment>]
+scalar clone [--single-branch] [--branch <main-branch>] [--full-clone] <url> [<enlistment>]
scalar list
scalar register [<enlistment>]
scalar unregister [<enlistment>]
@@ -57,6 +57,16 @@ HEAD[:<directory>]`.
Instead of checking out the branch pointed to by the cloned
repository's HEAD, check out the `<name>` branch instead.
+--[no-]single-branch::
+ Clone only the history leading to the tip of a single branch, either
+ specified by the `--branch` option or the primary branch remote's
+ `HEAD` points at.
++
+Further fetches into the resulting repository will only update the
+remote-tracking branch for the branch this option was used for the initial
+cloning. If the HEAD at the remote did not point at any branch when
+`--single-branch` clone was made, no remote-tracking branch is created.
+
--[no-]full-clone::
A sparse-checkout is initialized by default. This behavior can be
turned off via `--full-clone`.