summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-09-08 21:49:50 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-09-08 21:49:50 -0700
commit02c6c14d6c304f094b680f583a1dd6e4fe75736c (patch)
treefa598c403c80413a3446045cb5a287b61e38e673 /Documentation
parentMerge branch 'jh/status-v2-porcelain' (diff)
parentclone: recursive and reference option triggers submodule alternates (diff)
downloadtgif-02c6c14d6c304f094b680f583a1dd6e4fe75736c.tar.xz
Merge branch 'sb/submodule-clone-rr'
"git clone --resurse-submodules --reference $path $URL" is a way to reduce network transfer cost by borrowing objects in an existing $path repository when cloning the superproject from $URL; it learned to also peek into $path for presense of corresponding repositories of submodules and borrow objects from there when able. * sb/submodule-clone-rr: clone: recursive and reference option triggers submodule alternates clone: implement optional references clone: clarify option_reference as required clone: factor out checking for an alternate path submodule--helper update-clone: allow multiple references submodule--helper module-clone: allow multiple references t7408: merge short tests, factor out testing method t7408: modernize style
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/config.txt12
-rw-r--r--Documentation/git-clone.txt5
2 files changed, 16 insertions, 1 deletions
diff --git a/Documentation/config.txt b/Documentation/config.txt
index 8a115b3702..32f065ca6a 100644
--- a/Documentation/config.txt
+++ b/Documentation/config.txt
@@ -2853,6 +2853,18 @@ submodule.fetchJobs::
in parallel. A value of 0 will give some reasonable default.
If unset, it defaults to 1.
+submodule.alternateLocation::
+ Specifies how the submodules obtain alternates when submodules are
+ cloned. Possible values are `no`, `superproject`.
+ By default `no` is assumed, which doesn't add references. When the
+ value is set to `superproject` the submodule to be cloned computes
+ its alternates location relative to the superprojects alternate.
+
+submodule.alternateErrorStrategy
+ Specifies how to treat errors with the alternates for a submodule
+ as computed via `submodule.alternateLocation`. Possible values are
+ `ignore`, `info`, `die`. Default is `die`.
+
tag.forceSignAnnotated::
A boolean to specify whether annotated tags created should be GPG signed.
If `--annotate` is specified on the command line, it takes
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index ec41d3d698..e316c4bd51 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -90,13 +90,16 @@ If you want to break the dependency of a repository cloned with `-s` on
its source repository, you can simply run `git repack -a` to copy all
objects from the source repository into a pack in the cloned repository.
---reference <repository>::
+--reference[-if-able] <repository>::
If the reference repository is on the local machine,
automatically setup `.git/objects/info/alternates` to
obtain objects from the reference repository. Using
an already existing repository as an alternate will
require fewer objects to be copied from the repository
being cloned, reducing network and local storage costs.
+ When using the `--reference-if-able`, a non existing
+ directory is skipped with a warning instead of aborting
+ the clone.
+
*NOTE*: see the NOTE for the `--shared` option, and also the
`--dissociate` option.