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

Re: [PATCH v7 3/3] bundle doc: elaborate on rev<->ref restriction

From
Philip Oakley <philipoakley@iee.email>
Date
Jul 28, 2021, 15:17 UTC
Message-ID
<42d4fb18-f9ee-006d-b20a-af8708096fd8@iee.email>
In-Reply-To
<patch-3.3-88e7ad1cf4-20210727T002001Z-avarab@gmail.com>
On 27/07/2021 01:24, Ævar Arnfjörð Bjarmason wrote:
Show 63 quoted lines
> 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
>  --------------------
Previous: Ævar Arnfjörð BjarmasonNext: Junio C Hamano
Message 35 of 41 in “bundle doc: rewrite the "DESCRIPTION" section”
  1. bundle doc: rewrite the "DESCRIPTION" sectionÆvar Arnfjörð Bjarmason, Jun 7, 2021
  2. bundle doc: rewrite the "DESCRIPTION" sectionÆvar Arnfjörð Bjarmason, Jun 7, 2021
  3. Junio C HamanoJun 7, 2021
  4. 0/3 bundle doc: generaliz & elaborateÆvar Arnfjörð Bjarmason, Jun 24, 2021
  5. 1/3 bundle doc: rewrite the "DESCRIPTION" sectionÆvar Arnfjörð Bjarmason, Jun 24, 2021
  6. Junio C HamanoJun 29, 2021
  7. 2/3 bundle doc: split out thin v.s. not discussion from <rev-arg>Ævar Arnfjörð Bjarmason, Jun 24, 2021
  8. Junio C HamanoJun 29, 2021
  9. 3/3 bundle doc: elaborate on rev<->ref restrictionÆvar Arnfjörð Bjarmason, Jun 24, 2021
  10. 0/3 bundle doc: generalize & elaborateÆvar Arnfjörð Bjarmason, Jun 30, 2021
  11. 2/3 bundle doc: split out open v.s. closed discussion from <rev-arg>Ævar Arnfjörð Bjarmason, Jun 30, 2021
  12. Junio C HamanoJun 30, 2021
  13. 1/3 bundle doc: rewrite the "DESCRIPTION" sectionÆvar Arnfjörð Bjarmason, Jun 30, 2021
  14. 3/3 bundle doc: elaborate on rev<->ref restrictionÆvar Arnfjörð Bjarmason, Jun 30, 2021
  15. 0/3 bundle doc: generalize & elaborateÆvar Arnfjörð Bjarmason, Jul 2, 2021
  16. 1/3 bundle doc: rewrite the "DESCRIPTION" sectionÆvar Arnfjörð Bjarmason, Jul 2, 2021
  17. 2/3 bundle doc: elaborate on object prerequisitesÆvar Arnfjörð Bjarmason, Jul 2, 2021
  18. Junio C HamanoJul 2, 2021
  19. 3/3 bundle doc: elaborate on rev<->ref restrictionÆvar Arnfjörð Bjarmason, Jul 2, 2021
  20. 0/3 bundle doc: generalize & elaborateÆvar Arnfjörð Bjarmason, Jul 20, 2021
  21. 2/3 bundle doc: elaborate on object prerequisitesÆvar Arnfjörð Bjarmason, Jul 20, 2021
  22. Junio C HamanoJul 20, 2021
  23. 3/3 bundle doc: elaborate on rev<->ref restrictionÆvar Arnfjörð Bjarmason, Jul 20, 2021
  24. Junio C HamanoJul 20, 2021
  25. Philip OakleyJul 21, 2021
  26. Junio C HamanoJul 21, 2021
  27. Philip OakleyJul 22, 2021
  28. Ævar Arnfjörð BjarmasonJul 22, 2021
  29. Philip OakleyJul 22, 2021
  30. 1/3 bundle doc: rewrite the "DESCRIPTION" sectionÆvar Arnfjörð Bjarmason, Jul 20, 2021
  31. 0/3 bundle doc: generalize & elaborateÆvar Arnfjörð Bjarmason, Jul 27, 2021
  32. 1/3 bundle doc: rewrite the "DESCRIPTION" sectionÆvar Arnfjörð Bjarmason, Jul 27, 2021
  33. 2/3 bundle doc: elaborate on object prerequisitesÆvar Arnfjörð Bjarmason, Jul 27, 2021
  34. 3/3 bundle doc: elaborate on rev<->ref restrictionÆvar Arnfjörð Bjarmason, Jul 27, 2021
  35. Philip OakleyJul 28, 2021
  36. Junio C HamanoJul 28, 2021
  37. 0/3 bundle doc: generalize & elaborateÆvar Arnfjörð Bjarmason, Jul 31, 2021
  38. 1/4 bundle doc: rewrite the "DESCRIPTION" sectionÆvar Arnfjörð Bjarmason, Jul 31, 2021
  39. 2/4 bundle doc: elaborate on object prerequisitesÆvar Arnfjörð Bjarmason, Jul 31, 2021
  40. 3/4 bundle doc: elaborate on rev<->ref restrictionÆvar Arnfjörð Bjarmason, Jul 31, 2021
  41. 4/4 bundle doc: replace "basis" with "prerequsite(s)"Ævar Arnfjörð Bjarmason, Jul 31, 2021

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.