summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Stefan Beller <sbeller@google.com>2016-08-15 14:53:26 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-08-15 15:28:45 -0700
commitf7415b4d71150d5c2d52f87c8792591237aaf00e (patch)
treeff28dcf7118ebddb88df8b24b3744c01fbb04e3e /Documentation
parentclone: clarify option_reference as required (diff)
downloadtgif-f7415b4d71150d5c2d52f87c8792591237aaf00e.tar.xz
clone: implement optional references
In a later patch we want to try to create alternates for submodules, but they might not exist in the referenced superproject. So add a way to skip the non existing references and report them. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/git-clone.txt5
1 files changed, 4 insertions, 1 deletions
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.