mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <>
To: Junio C Hamano <>
Cc: Philip Oakley <>,
	GitList <>,
	Pratyush Yadav <>
Subject: Re: [PATCH v5] Doc: Bundle file usage
Date: Sun, 20 Oct 2019 23:16:10 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, Oct 21, 2019 at 11:48:40AM +0900, Junio C Hamano wrote:

> > +`git clone` can use any bundle created without negative refspecs
> > +(e.g., `new`, but not ``).
> 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.

Sorry, this one is my fault. I said "negative revisions" in my earlier
mail[1], but somehow while writing example text my brain turned into
"refspecs", which is obviously nonsense. It should be "revisions".

I don't mind using "basis" either; it's not commonly used outside of
this page, but I think it does succinctly represent what we're trying to
say here.


> > +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.

I hoped maybe it would be obvious how the second and fourth cases would
behave, but maybe it is better to spell it out. Maybe it would be better
to talk about what the sender does, and then what the receiver can do
with the result. Something like:

  If you create a bundle using `--all` for `<git-rev-list-args>`, a
  recipient can clone the result using `git clone` or `git clone
  --mirror` and get the same result they would by cloning directly from
  the source repository. If you instead create it with `--branches
  --tags`, the resulting bundle may be smaller, and a non-mirror clone
  will behave the same (but a `clone --mirror` will obviously not
  receive any refs outside of the branches and tags).

That could probably be tightened up a bit.


      reply	other threads:[~2019-10-21  3:16 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
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 [this message]

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:

  List information:

* 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).