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
Junio C Hamano <gitster@pobox.com>
Date
Jul 28, 2021, 18:05 UTC
Message-ID
<xmqqa6m69uvh.fsf@gitster.g>
In-Reply-To
<patch-3.3-88e7ad1cf4-20210727T002001Z-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
> +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'.

As I already said in the review of v6, I do not think "header has a format similar to show-ref" is not something we need to say so prominently to the user.

The reason we should give readers why they must give refs while creating a bundle, I think, is because the only way to access the contents of the bundle is to fetch refs from it, and the refs given to the command when the bundle was created becomes the refs that can be fetched from the bundle.

And that is what the readers should be told here, I think.
Show 8 quoted lines
> +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`).

Also, we introduced "prerequisite objects" in the previous step, but here we say "basis". The readers would be helped greatly if we were a bit more consistent.

Show 10 quoted lines
> ...
> +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.
> +----------------
This is a good example, as Philip already said.
Thanks.
Previous: Philip OakleyNext: Ævar Arnfjörð Bjarmason
Message 36 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.