From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Emeric Fermas <emeric.fermas@gmail.com>
Subject: [PATCH 1/2] docs/clone: mention that --local may be ignored
Date: Wed, 30 May 2012 07:09:08 -0400 [thread overview]
Message-ID: <20120530110907.GA15550@sigill.intra.peff.net> (raw)
In-Reply-To: <20120530110305.GA13445@sigill.intra.peff.net>
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>
---
Documentation/git-clone.txt | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index 6e22522..1d267f4 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
--
1.7.11.rc0.12.g6048c92
next prev parent reply other threads:[~2012-05-30 11:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-26 3:42 [PATCH 0/3] clone --local fixes Jeff King
2012-05-26 3:42 ` [PATCH 1/3] t5701: modernize style Jeff King
2012-05-26 3:45 ` [PATCH 2/3] clone: make --local handle URLs Jeff King
2012-05-28 18:31 ` Johannes Sixt
2012-05-28 19:10 ` Jeff King
2012-05-26 3:45 ` [PATCH 3/3] clone: allow --no-local to turn off local optimizations Jeff King
2012-05-26 4:11 ` [PATCH 4/3] clone: send diagnostic messages to stderr Jeff King
2012-05-27 6:32 ` [PATCH 0/3] clone --local fixes Junio C Hamano
2012-05-28 5:36 ` Jeff King
2012-05-29 17:43 ` Junio C Hamano
2012-05-30 11:03 ` Jeff King
2012-05-30 11:08 ` Jeff King
2012-05-30 11:09 ` Jeff King [this message]
2012-05-30 11:10 ` [PATCH 2/2] clone: allow --no-local to turn off local optimizations Jeff King
2012-05-30 17:20 ` Junio C Hamano
2012-05-30 21:59 ` Jeff King
2012-05-30 22:10 ` Junio C Hamano
2012-05-30 23:21 ` Jeff King
2012-05-30 23:33 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120530110907.GA15550@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=emeric.fermas@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).