From f7415b4d71150d5c2d52f87c8792591237aaf00e Mon Sep 17 00:00:00 2001 From: Stefan Beller Date: Mon, 15 Aug 2016 14:53:26 -0700 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Documentation/git-clone.txt') 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 :: +--reference[-if-able] :: 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. -- cgit v1.3