git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v5] Doc: Bundle file usage

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 21, 2019, 02:48 UTC
Message-ID
<xmqq7e4yn793.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20191020110306.1714-1-philipoakley@iee.email>
Philip Oakley <philipoakley@iee.email> writes:
Show 15 quoted lines
> @@ -20,11 +20,14 @@ DESCRIPTION
>  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.
> +
> +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',
> +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
>  bundle assumes that all objects in the basis are already in the

Notice that we use the term `basis` here. It is referring to the bottom end(s) of the commit graph.

> +`git clone` can use any bundle created without negative refspecs
> +(e.g., `new`, but not `old..new`).

To be consistent with the phrasing of this particular document we saw earlier, you would have said "without basis", but I think the use of `basis` did not spread beyond "git bundle" documentation.

If we were writing "git bundle" and its documentation from scratch using more modern lingo, we probably would say "negative revisions" here. Note that the word `refspec` has no place in the context of this sentence; they are to specify the mapping of refs between the repository in which transferred objects originate and the repository that accept the objects. Also note that `basis` discussed in 'git bundle' is a bit wider concept than `negative revisions`, so mere mechanical replacements would not be sufficient as a preliminary modernization/prepation step for this patch.

Show 5 quoted lines
> +If you want to match `git clone --mirror`, which would include your
> +refs such as `refs/remotes/*`, use `--all`.
> +If you want to provide the same set of refs that a clone directly
> +from the source repository would get, use `--branches --tags` for
> +the `<git-rev-list-args>`.

This is not wrong per-se, but may lead to confusion. The readers must be able to learn:

 - "git clone --mirror full.bndl dst/" from a full bundle created
   with "git bundle create full.bndl --all" can mimic creation of a
   full mirror of the original.
 - "git clone full.bndl dst/" from such a bundle does *not* result
   in creation of a mirror.
 - "git clone slim.bndl dst/" from a minimum bundle created wth "git
   bundle create slim.bndl --branches --tags" would be sufficient to
   obtain the same result as the above.
 - "git clone --mirror slim.bndl dst/" from such a minimum bundle
   cannot mimic creation of a full mirror of the original.

I am not sure the second point is conveyed well with the new paragraph. That is, "--all" must be used if the resulting bundle is meant to be usable to "--mirror" clone from, but it can still be used to clone normally. If you do not intend to mirror-clone from, there is not much point in using "--all" to record extra refs.

Not having the new paragraph does not convey anything at all, so it definitely is an improvement, though ;-)

Thanks.
Previous: Philip OakleyNext: Jeff King
Message 14 of 15 in “[PATCHv2 1/8] Doc: Bundle file usage”
  1. Philip OakleySep 18, 2012
  2. Junio C HamanoSep 18, 2012
  3. Doc: Bundle file usagePhilip Oakley, Oct 16, 2019
  4. Philip OakleyOct 16, 2019
  5. Jeff KingOct 16, 2019
  6. Junio C HamanoOct 17, 2019
  7. Doc: Bundle file usagePhilip Oakley, Oct 18, 2019
  8. Pratyush YadavOct 18, 2019
  9. Philip OakleyOct 18, 2019
  10. Doc: Bundle file usagePhilip Oakley, Oct 18, 2019
  11. Jeff KingOct 20, 2019
  12. Philip OakleyOct 20, 2019
  13. Doc: Bundle file usagePhilip Oakley, Oct 20, 2019
  14. Junio C HamanoOct 21, 2019
  15. Jeff KingOct 21, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.