From: Philip Oakley <philipoakley@iee.email>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>, git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Johannes Schindelin <Johannes.Schindelin@gmx.de>
Subject: Re: [PATCH v7 3/3] bundle doc: elaborate on rev<->ref restriction
Date: Wed, 28 Jul 2021 16:17:33 +0100 [thread overview]
Message-ID: <42d4fb18-f9ee-006d-b20a-af8708096fd8@iee.email> (raw)
In-Reply-To: <patch-3.3-88e7ad1cf4-20210727T002001Z-avarab@gmail.com>
On 27/07/2021 01:24, Ævar Arnfjörð Bjarmason wrote:
> Elaborate on the restriction that you cannot provide a revision that
> doesn't resolve to a reference in the "SPECIFYING REFERENCES" section
> with examples.
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
> Documentation/git-bundle.txt | 47 ++++++++++++++++++++++++++++++------
> 1 file changed, 39 insertions(+), 8 deletions(-)
>
> diff --git a/Documentation/git-bundle.txt b/Documentation/git-bundle.txt
> index f1f84ce2c4..0f28c41409 100644
> --- a/Documentation/git-bundle.txt
> +++ b/Documentation/git-bundle.txt
> @@ -144,14 +144,45 @@ unbundle <file>::
> SPECIFYING REFERENCES
> ---------------------
>
> -'git bundle' will only package references that are shown by
> -'git show-ref': this includes heads, tags, and remote heads. References
> -such as `master~1` cannot be packaged, but are perfectly suitable for
> -defining the basis. More than one reference may be packaged, and more
> -than one basis can be specified. The objects packaged are those not
> -contained in the union of the given bases. Each basis can be
> -specified explicitly (e.g. `^master~10`), or implicitly (e.g.
> -`master~10..master`, `--since=10.days.ago master`).
> +Revisions must accompanied by reference names to be packaged in a
> +bundle, since the header of the bundle is in a format similar to 'git
> +show-ref'.
> +
> +More than one reference may be packaged, and more than one basis can
> +be specified. The objects packaged are those not contained in the
> +union of the given bases.
> +
> +The 'git bundle create' command resolves the reference names for you
> +using the same rules as `git rev-parse --abbrev-ref=loose`. Each
> +basis can be specified explicitly (e.g. `^master~10`), or implicitly
> +(e.g. `master~10..master`, `--since=10.days.ago master`).
> +
> +All of these simple cases are OK (assuming we have a "master" and
> +"next" branch):
> +
> +----------------
> +$ git bundle create master.bundle master
> +$ echo master | git bundle create master.bundle --stdin
> +$ git bundle create master-and-next.bundle master next
> +$ (echo master; echo next) | git bundle create master-and-next.bundle --stdin
> +----------------
> +
> +And so are these (and the same but omitted `--stdin` examples):
> +
> +----------------
> +$ git bundle create recent-master.bundle master~10..master
> +$ git bundle create recent-updates.bundle master~10..master next~5..next
> +----------------
> +
> +A revision name or a range whose right-hand-side cannot be resolved to
> +a reference is not accepted:
> +
> +----------------
> +$ git bundle create HEAD.bundle $(git rev-parse HEAD)
> +fatal: Refusing to create empty bundle.
> +$ git bundle create master-yesterday.bundle master~10..master~5
> +fatal: Refusing to create empty bundle.
I like this example showing the need for a reference name to be part of
the basis, clarifying that part of the description.
Philip
> +----------------
>
> OBJECT PREREQUISITES
> --------------------
next prev parent reply other threads:[~2021-07-28 15:17 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-07 14:37 [PATCH] bundle doc: rewrite the "DESCRIPTION" section Ævar Arnfjörð Bjarmason
2021-06-07 16:56 ` [PATCH v2] " Ævar Arnfjörð Bjarmason
2021-06-07 23:35 ` Junio C Hamano
2021-06-24 19:40 ` [PATCH v3 0/3] bundle doc: generaliz & elaborate Ævar Arnfjörð Bjarmason
2021-06-24 19:40 ` [PATCH v3 1/3] bundle doc: rewrite the "DESCRIPTION" section Ævar Arnfjörð Bjarmason
2021-06-29 4:52 ` Junio C Hamano
2021-06-24 19:40 ` [PATCH v3 2/3] bundle doc: split out thin v.s. not discussion from <rev-arg> Ævar Arnfjörð Bjarmason
2021-06-29 4:52 ` Junio C Hamano
2021-06-24 19:40 ` [PATCH v3 3/3] bundle doc: elaborate on rev<->ref restriction Ævar Arnfjörð Bjarmason
2021-06-30 9:16 ` [PATCH v4 0/3] bundle doc: generalize & elaborate Ævar Arnfjörð Bjarmason
2021-06-30 9:16 ` [PATCH v4 1/3] bundle doc: rewrite the "DESCRIPTION" section Ævar Arnfjörð Bjarmason
2021-06-30 9:16 ` [PATCH v4 2/3] bundle doc: split out open v.s. closed discussion from <rev-arg> Ævar Arnfjörð Bjarmason
2021-06-30 21:13 ` Junio C Hamano
2021-06-30 9:16 ` [PATCH v4 3/3] bundle doc: elaborate on rev<->ref restriction Ævar Arnfjörð Bjarmason
2021-07-02 11:26 ` [PATCH v5 0/3] bundle doc: generalize & elaborate Ævar Arnfjörð Bjarmason
2021-07-02 11:26 ` [PATCH v5 1/3] bundle doc: rewrite the "DESCRIPTION" section Ævar Arnfjörð Bjarmason
2021-07-02 11:26 ` [PATCH v5 2/3] bundle doc: elaborate on object prerequisites Ævar Arnfjörð Bjarmason
2021-07-02 15:10 ` Junio C Hamano
2021-07-02 11:26 ` [PATCH v5 3/3] bundle doc: elaborate on rev<->ref restriction Ævar Arnfjörð Bjarmason
2021-07-20 14:20 ` [PATCH v6 0/3] bundle doc: generalize & elaborate Ævar Arnfjörð Bjarmason
2021-07-20 14:20 ` [PATCH v6 1/3] bundle doc: rewrite the "DESCRIPTION" section Ævar Arnfjörð Bjarmason
2021-07-20 14:20 ` [PATCH v6 2/3] bundle doc: elaborate on object prerequisites Ævar Arnfjörð Bjarmason
2021-07-20 20:06 ` Junio C Hamano
2021-07-20 14:20 ` [PATCH v6 3/3] bundle doc: elaborate on rev<->ref restriction Ævar Arnfjörð Bjarmason
2021-07-20 20:19 ` Junio C Hamano
2021-07-21 9:27 ` Philip Oakley
2021-07-21 16:57 ` Junio C Hamano
2021-07-22 11:37 ` Philip Oakley
2021-07-22 11:46 ` Ævar Arnfjörð Bjarmason
2021-07-22 23:14 ` Philip Oakley
2021-07-27 0:24 ` [PATCH v7 0/3] bundle doc: generalize & elaborate Ævar Arnfjörð Bjarmason
2021-07-27 0:24 ` [PATCH v7 1/3] bundle doc: rewrite the "DESCRIPTION" section Ævar Arnfjörð Bjarmason
2021-07-27 0:24 ` [PATCH v7 2/3] bundle doc: elaborate on object prerequisites Ævar Arnfjörð Bjarmason
2021-07-27 0:24 ` [PATCH v7 3/3] bundle doc: elaborate on rev<->ref restriction Ævar Arnfjörð Bjarmason
2021-07-28 15:17 ` Philip Oakley [this message]
2021-07-28 18:05 ` Junio C Hamano
2021-07-31 8:23 ` [PATCH v8 0/3] bundle doc: generalize & elaborate Ævar Arnfjörð Bjarmason
2021-07-31 8:23 ` [PATCH v8 1/4] bundle doc: rewrite the "DESCRIPTION" section Ævar Arnfjörð Bjarmason
2021-07-31 8:23 ` [PATCH v8 2/4] bundle doc: elaborate on object prerequisites Ævar Arnfjörð Bjarmason
2021-07-31 8:23 ` [PATCH v8 3/4] bundle doc: elaborate on rev<->ref restriction Ævar Arnfjörð Bjarmason
2021-07-31 8:23 ` [PATCH v8 4/4] bundle doc: replace "basis" with "prerequsite(s)" Ævar Arnfjörð Bjarmason
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
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 \
--in-reply-to=42d4fb18-f9ee-006d-b20a-af8708096fd8@iee.email \
--to=philipoakley@iee.email \
--cc=Johannes.Schindelin@gmx.de \
--cc=avarab@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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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).