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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King
2012-05-30 07:09:08 -04:00
committed by Junio C Hamano
parent 0680f745ac
commit 9197a10c71

View File

@ -46,13 +46,16 @@ OPTIONS
mechanism and clones the repository by making a copy of mechanism and clones the repository by making a copy of
HEAD and everything under objects and refs directories. HEAD and everything under objects and refs directories.
The files under `.git/objects/` directory are hardlinked The files under `.git/objects/` directory are hardlinked
to save space when possible. This is now the default when to save space when possible.
the source repository is specified with `/path/to/repo` +
syntax, so it essentially is a no-op option. To force If the repository is specified as a local path (e.g., `/path/to/repo`),
copying instead of hardlinking (which may be desirable this is the default, and --local is essentially a no-op. If the
if you are trying to make a back-up of your repository), repository is specified as a URL, then this flag is ignored (and we
but still avoid the usual "git aware" transport never use the local optimizations).
mechanism, `--no-hardlinks` can be used. +
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:: --no-hardlinks::
Optimize the cloning process from a repository on a Optimize the cloning process from a repository on a