git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philip Oakley <philipoakley@iee.email>
To: GitList <git@vger.kernel.org>, Junio C Hamano <gitster@pobox.com>,
	Jeff King <peff@peff.net>
Cc: Philip Oakley <philipoakley@iee.email>,
	Philip Oakley <philipoakley@iee.org>
Subject: [PATCH v2] Doc: Bundle file usage
Date: Wed, 16 Oct 2019 10:57:37 +0100	[thread overview]
Message-ID: <20191016095737.1588-1-philipoakley@iee.email> (raw)
In-Reply-To: <7vzk4mj38g.fsf@alter.siamese.dyndns.org>

From: Philip Oakley <philipoakley@iee.org>

Git URLs can accept bundle files for fetch, pull and clone, include
in that section. Include git clone in the bundle usage description.
Correct the quoting of <git-rev-list-args>.
Detail the <git-rev-list-args> options for cloning a complete repo.

Signed-off-by: Philip Oakley <philipoakley@iee.email>
---

This takes up the advice from peff in 
https://public-inbox.org/git/20191011161112.GA19741@sigill.intra.peff.net/
from the original v1 in 2012(!)
https://public-inbox.org/git/1348010734-664-2-git-send-email-philipoakley@iee.org/

Hopefully this covers Junio's concerns from that time.
-- 
Philip

---
 Documentation/git-bundle.txt | 10 +++++++---
 Documentation/urls.txt       |  3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
index 7d6c9dcd17..0498e4895d 100644
--- a/Documentation/git-bundle.txt
+++ b/Documentation/git-bundle.txt
@@ -21,9 +21,9 @@ Some workflows require that one or more branches of development on one
 machine be replicated on another machine, but the two machines cannot
 be directly connected, and therefore the interactive Git protocols (git,
 ssh, http) cannot be used.  This command provides support for
-'git fetch' and 'git pull' to operate by packaging objects and references
+'git fetch' and 'git pull' and 'git clone', to operate by packaging objects and references
 in an archive at the originating machine, then importing those into
-another repository using 'git fetch' and 'git pull'
+another repository using 'git fetch' and 'git pull' or 'git clone',
 after moving the archive by some means (e.g., by sneakernet).  As no
 direct connection between the repositories exists, the user must specify a
 basis for the bundle that is held by the destination repository: the
@@ -35,7 +35,7 @@ OPTIONS
 
 create <file>::
 	Used to create a bundle named 'file'.  This requires the
-	'git-rev-list-args' arguments to define the bundle contents.
+	'<git-rev-list-args>' arguments to define the bundle contents.
 
 verify <file>::
 	Used to check that a bundle file is valid and will apply
@@ -92,6 +92,10 @@ It is okay to err on the side of caution, causing the bundle file
 to contain objects already in the destination, as these are ignored
 when unpacking at the destination.
 
+To create a bundle for 'git clone', use `--branches --tags` for
+the <git-rev-list-args>. The (inappropriate) use of `--all` would include
+refs from refs/remotes/* hierarchy in the resulting bundle.
+
 EXAMPLES
 --------
 
diff --git a/Documentation/urls.txt b/Documentation/urls.txt
index bc354fe2dc..1c229d7581 100644
--- a/Documentation/urls.txt
+++ b/Documentation/urls.txt
@@ -53,6 +53,9 @@ These two syntaxes are mostly equivalent, except the former implies
 --local option.
 endif::git-clone[]
 
+'git clone', 'git fetch' and 'git pull', but not 'git push', will also
+accept a suitable bundle file. See linkgit:git-bundle[1].
+
 When Git doesn't know how to handle a certain transport protocol, it
 attempts to use the 'remote-<transport>' remote helper, if one
 exists. To explicitly request a remote helper, the following syntax
-- 
2.23.0.windows.1.21.g947f504ebe8.dirty


  reply	other threads:[~2019-10-16 10:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-18 23:25 [PATCHv2 1/8] Doc: Bundle file usage Philip Oakley
2012-09-18 23:55 ` Junio C Hamano
2019-10-16  9:57   ` Philip Oakley [this message]
2019-10-16 10:15     ` [PATCH v2] " Philip Oakley
2019-10-16 21:09     ` Jeff King
2019-10-17  2:54       ` Junio C Hamano
2019-10-18 15:15       ` [PATCH v3] " Philip Oakley
2019-10-18 18:15         ` Pratyush Yadav
2019-10-18 19:58           ` Philip Oakley
2019-10-18 20:30             ` [PATCH v4] " Philip Oakley
2019-10-20  1:10               ` Jeff King
2019-10-20 10:49                 ` Philip Oakley
2019-10-20 11:03                   ` [PATCH v5] " Philip Oakley
2019-10-21  2:48                     ` Junio C Hamano
2019-10-21  3:16                       ` Jeff King

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=20191016095737.1588-1-philipoakley@iee.email \
    --to=philipoakley@iee.email \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=philipoakley@iee.org \
    /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).