From: Jeff King <firstname.lastname@example.org>
To: Philip Oakley <email@example.com>
Cc: GitList <firstname.lastname@example.org>, Junio C Hamano <email@example.com>,
Philip Oakley <firstname.lastname@example.org>
Subject: Re: [PATCH v2] Doc: Bundle file usage
Date: Wed, 16 Oct 2019 17:09:57 -0400 [thread overview]
Message-ID: <20191016210957.GA28981@sigill.intra.peff.net> (raw)
On Wed, Oct 16, 2019 at 10:57:37AM +0100, Philip Oakley wrote:
> From: Philip Oakley <email@example.com>
> 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.
Thanks for picking this up again. :)
A few minor comments:
> 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
'git fetch', 'git pull', and 'git clone'
? Given the repetition below, though:
> 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',
I wonder if we could rephrase this in a less awkward way. Perhaps:
The 'git bundle' command packages objects and references in an archive
at the originating machine, which can then be imported into another
repository using 'git fetch', 'git pull', or 'git clone'.
> @@ -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.
This hunk makes sense. I'd probably use backticks here instead of
single-quotes, but I think we're pretty inconsistent across the
documentation about this. It probably makes sense to match the
> @@ -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.
Should <git-rev-list-args> be in quotes or backticks?
Any bundle created without a negative revision would be appropriate for
a clone. Maybe we could spell that out in more detail, like:
Any bundle created without negative refspecs (e.g., `new` but not
`old..new`) can be used on the receiving side with `git clone`. If you
want to provide the same set of refs that a clone directly from the
source repository would get, use `--branches --tags`. If you want to
match `git clone --mirror`, which would clone other refs such as
`refs/remotes/*`, use `--all`.
> 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.
> +'git clone', 'git fetch' and 'git pull', but not 'git push', will also
> +accept a suitable bundle file. See linkgit:git-bundle.
This makes sense to mention here. It's a little funny because the user
would see this included in "man git-clone" or whatever, but I don't
think it hurts to just be exhaustive rather than trying to tailor it to
each individual manpage.
next prev parent reply other threads:[~2019-10-16 21:09 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 ` [PATCH v2] " Philip Oakley
2019-10-16 10:15 ` Philip Oakley
2019-10-16 21:09 ` Jeff King [this message]
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
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:
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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.
Code repositories for project(s) associated with this public inbox
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 read-only IMAP folder(s) and NNTP newsgroup(s).