From 9197a10c7188a74356384a7ce46e05104ac68240 Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 30 May 2012 07:09:08 -0400 Subject: docs/clone: mention that --local may be ignored The --local flag is not "treat this like a local repository", but rather "if we are local, turn on optimizations". Therefore it does nothing in the case of: git clone --local file:///path/to/repo Let's make that more clear in the documentation. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Documentation') diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 6e22522c4f..1d267f4712 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -46,13 +46,16 @@ OPTIONS mechanism and clones the repository by making a copy of HEAD and everything under objects and refs directories. The files under `.git/objects/` directory are hardlinked - to save space when possible. This is now the default when - the source repository is specified with `/path/to/repo` - syntax, so it essentially is a no-op option. To force - copying instead of hardlinking (which may be desirable - if you are trying to make a back-up of your repository), - but still avoid the usual "git aware" transport - mechanism, `--no-hardlinks` can be used. + to save space when possible. ++ +If the repository is specified as a local path (e.g., `/path/to/repo`), +this is the default, and --local is essentially a no-op. If the +repository is specified as a URL, then this flag is ignored (and we +never use the local optimizations). ++ +To force copying instead of hardlinking (which may be desirable if you +are trying to make a back-up of your repository), but still avoid the +usual "git aware" transport mechanism, `--no-hardlinks` can be used. --no-hardlinks:: Optimize the cloning process from a repository on a -- cgit v1.2.3 From 189260b190be845f0e24ede93f9ac539627d72fa Mon Sep 17 00:00:00 2001 From: Jeff King Date: Wed, 30 May 2012 07:10:16 -0400 Subject: clone: allow --no-local to turn off local optimizations This is basically the same as using "file://", but is a little less subtle for the end user. It also allows relative paths to be specified. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- Documentation/git-clone.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt index 1d267f4712..c1ddd4c2cc 100644 --- a/Documentation/git-clone.txt +++ b/Documentation/git-clone.txt @@ -51,7 +51,9 @@ OPTIONS If the repository is specified as a local path (e.g., `/path/to/repo`), this is the default, and --local is essentially a no-op. If the repository is specified as a URL, then this flag is ignored (and we -never use the local optimizations). +never use the local optimizations). Specifying `--no-local` will +override the default when `/path/to/repo` is given, using the regular +git transport instead. + To force copying instead of hardlinking (which may be desirable if you are trying to make a back-up of your repository), but still avoid the -- cgit v1.2.3