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

[PATCH v2 0/6] doc: update-ref: amend old material and discuss symrefs

From
Kkristofferhaugsbakk@fastmail.com <kristofferhaugsbakk@fastmail.com>
Date
Oct 19, 2024, 19:59 UTC
Message-ID
<cover.1729367469.git.code@khaugsbakk.name>
In-Reply-To
<cover.1729017728.git.code@khaugsbakk.name>
From: Kristoffer Haugsbakk <code@khaugsbakk.name>

This series removes or moves some old material in the update-ref doc and improves the discussion of symrefs, opting for a high-level description with some redundancy (see patch 5/6) in order to avoid a reported mistake/confusion.

The end goal (after all patches are applied):
• First paragraph (in Description) describes the first form
• Second paragraph the second form
• Third paragraph mentions symrefs and explains why `--stdin` supports
  them
• A new section whither the symlink (FS) vs. symrefs discussion is moved
• Link update-ref to symbolic-ref and vice versa
§ Changes in v2

See notes on the patches for all changes. Some of the minor ones are omitted here.

• Diff changes (see interdiff):
  • Fix “the the”
• All: Taylor suggested changing the “area” prefix
  • (but I kept it on the series for consistency)
  • Link: https://lore.kernel.org/git/ZxAoFUDmdfZ8rlLs@nand.local/
• Patch “drop “flag” ”:
  • Not done: Wrap paragraph
• Patch “remove confusing paragraph”
  • (Commit) Message tweak
  • Mention that what a symref is (concretely) is documented elsewhere
• Patch “discuss symbolic refs”:
  • change subject from “symbolic links”
  • Credit Bence
Kristoffer Haugsbakk (6):
  Documentation/git-update-ref.txt: drop “flag”
  Documentation/git-update-ref.txt: remove safety paragraphs
  Documentation/git-update-ref.txt: demote symlink to last section
  Documentation/git-update-ref.txt: remove confusing paragraph
  Documentation/git-update-ref.txt: discuss symbolic refs
  Documentation: mutually link update-ref and symbolic-ref
 Documentation/git-symbolic-ref.txt |  4 +++
 Documentation/git-update-ref.txt   | 48 +++++++++++++-----------------
 2 files changed, 25 insertions(+), 27 deletions(-)
Interdiff against v1:
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index fada3f670eb..c64d80f5a2d 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -28,8 +28,8 @@ not exist.
 The final arguments are object names; this command without any options
 does not support updating a symbolic ref to point to another ref (see
 linkgit:git-symbolic-ref[1]).  But `git update-ref --stdin` does have
-the the `symref-*` commands so that regular refs and symbolic refs can
-be committed in the same transaction.
+the `symref-*` commands so that regular refs and symbolic refs can be
+committed in the same transaction.
 
 If --no-deref is given, <ref> itself is overwritten, rather than
 the result of following the symbolic pointers.
Range-diff against v1:
1:  ad9ee00a2a9 ! 1:  91c1cae3209 doc: update-ref: drop “flag”
    @@ Metadata
     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
      ## Commit message ##
    -    doc: update-ref: drop “flag”
    +    Documentation/git-update-ref.txt: drop “flag”
     
    -    The other paragraphs on options say `With <option>,`.  Let’s be uniform.
    +    The other paragraphs on options say “With <option>,”.  Let’s be uniform.
     
         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
    +
    + ## Notes (series) ##
    +    v2:
    +    • Message: tweak
    +    • Not done: paragraph wrapping.  I found something else in this
    +      paragraph: missing “that”: “after verifying *that*”.  I will fix that
    +      in an upcoming series since there were four other missing instances of
    +      this word and I did not want to add another patch to this series.
    +
      ## Documentation/git-update-ref.txt ##
     @@ Documentation/git-update-ref.txt: for reading but not for writing (so we'll never write through a
      ref symlink to some other tree, if you have copied a whole
2:  c4bc0553a30 ! 2:  71d1e6364a2 doc: update-ref: remove safety paragraphs
    @@ Metadata
     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
      ## Commit message ##
    -    doc: update-ref: remove safety paragraphs
    +    Documentation/git-update-ref.txt: remove safety paragraphs
     
         Remove paragraphs which explain that using this command is safer than
         echoing the branch name into `HEAD`.
3:  3f43ddfed24 ! 3:  ca786bff978 doc: update-ref: demote symlink to last section
    @@ Metadata
     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
      ## Commit message ##
    -    doc: update-ref: demote symlink to last section
    +    Documentation/git-update-ref.txt: demote symlink to last section
     
         Move the discussion of file system symbolic links to a new “Notes”
         section (inspired by the one in git-symbolic-ref(1)) since this is
4:  dec48e2d37c ! 4:  769fd20945d doc: update-ref: remove confusing paragraph
    @@ Metadata
     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
      ## Commit message ##
    -    doc: update-ref: remove confusing paragraph
    +    Documentation/git-update-ref.txt: remove confusing paragraph
     
    -    This paragraph interrupts the flow of this section by going into detail
    +    This paragraph interrupts the flow of the section by going into detail
         about what a symbolic ref file is and how it is implemented.  It is not
         clear what the purpose is since symbolic refs were already mentioned
         prior (“possibly dereferencing the symbolic refs”).  Worse, it can
    @@ Commit message
         be lead to try `<new-oid>` and then get a confusing error since
         update-ref will just say that it is not a valid SHA1.
     
    +    gitglossary(7) already documents what a symref is, concretely, and quite
    +    well at that.
    +
         Reported-by: Bence Ferdinandy <bence@ferdinandy.com>
         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
     
      ## Notes (series) ##
    -    This paragraph is also from the initial documentation: 129056370ab (Add
    -    missing documentation., 2005-10-04).
    +    v2:
    +    • Message: replace “this” with “the”, which avoids two “this” close to
    +      each other
    +    • Message: Mention that what a symref is (concretely) is covered
    +      by gitglossary(7)
     
      ## Documentation/git-update-ref.txt ##
     @@ Documentation/git-update-ref.txt: value is <old-oid>.  You can specify 40 "0" or an empty string
5:  3575fb48c93 ! 5:  ca5ece5336c doc: update-ref: discuss symbolic links
    @@ Metadata
     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
      ## Commit message ##
    -    doc: update-ref: discuss symbolic links
    +    Documentation/git-update-ref.txt: discuss symbolic refs
     
         Add a paragraph which just emphasizes that the command without any
    -    options does not support refs in the final arguments.  This is
    -    clear already from the names `<new-oid>` and `<old-oid>` but the right
    -    balance of redundancy makes documentation robust to stray
    -    interpretation.
    +    options does not support refs in the final arguments.  This is clear
    +    already from the names `<new-oid>` and `<old-oid>` but the right balance
    +    of redundancy makes documentation robust against stray interpretation.
     
         This is also a good place to mention why `--stdin` has those `symref-*`
         commands.
     
    +    Suggested-by: Bence Ferdinandy <bence@ferdinandy.com>
         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
    +
    + ## Notes (series) ##
    +    v2:
    +    • Message: grammar: “robust against”
    +    • Message: Apparently the first paragraph wasn’t wrapped properly
    +    • Fix “the the”
    +    • Credit Bence for this suggestion which I forgot to do in v1
    +
    +      Link: https://lore.kernel.org/git/D4U30MD29CJT.3US5SBR598DVY@ferdinandy.com/
    +    • Message: “symbolic refs”, not links
    +
      ## Documentation/git-update-ref.txt ##
     @@ Documentation/git-update-ref.txt: value is <old-oid>.  You can specify 40 "0" or an empty string
      as <old-oid> to make sure that the ref you are creating does
    @@ Documentation/git-update-ref.txt: value is <old-oid>.  You can specify 40 "0" or
     +The final arguments are object names; this command without any options
     +does not support updating a symbolic ref to point to another ref (see
     +linkgit:git-symbolic-ref[1]).  But `git update-ref --stdin` does have
    -+the the `symref-*` commands so that regular refs and symbolic refs can
    -+be committed in the same transaction.
    ++the `symref-*` commands so that regular refs and symbolic refs can be
    ++committed in the same transaction.
     +
      If --no-deref is given, <ref> itself is overwritten, rather than
      the result of following the symbolic pointers.
6:  9e775a65eb3 ! 6:  fd3c7585a0f doc: mutually link update-ref and symbolic-ref
    @@ Metadata
     Author: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
      ## Commit message ##
    -    doc: mutually link update-ref and symbolic-ref
    +    Documentation: mutually link update-ref and symbolic-ref
     
         These two commands are similar enough to acknowledge each other on their
         documentation pages.

base-commit: ef8ce8f3d4344fd3af049c17eeba5cd20d98b69f
-- 
2.46.1.641.g54e7913fcb6
Previous: Kristoffer HaugsbakkNext: kristofferhaugsbakk@fastmail.com
Message 34 of 54 in “ref: with git update-ref?”
  1. Bence FerdinandyOct 11, 2024
  2. Kristoffer HaugsbakkOct 11, 2024
  3. Bence FerdinandyOct 11, 2024
  4. Junio C HamanoOct 11, 2024
  5. Bence FerdinandyOct 12, 2024
  6. Phillip WoodOct 13, 2024
  7. Kristoffer HaugsbakkOct 13, 2024
  8. karthik nayakOct 13, 2024
  9. Kristoffer HaugsbakkOct 13, 2024
  10. Bence FerdinandyOct 13, 2024
  11. Kristoffer HaugsbakkOct 14, 2024
  12. 0/6 doc: update-ref: amend old material and discuss symrefskristofferhaugsbakk@fastmail.com, Oct 15, 2024
  13. 1/6 doc: update-ref: drop “flag”kristofferhaugsbakk@fastmail.com, Oct 15, 2024
  14. Taylor BlauOct 16, 2024
  15. Eric SunshineOct 16, 2024
  16. Taylor BlauOct 16, 2024
  17. Kristoffer HaugsbakkOct 17, 2024
  18. Eric SunshineOct 17, 2024
  19. Taylor BlauOct 17, 2024
  20. 2/6 doc: update-ref: remove safety paragraphskristofferhaugsbakk@fastmail.com, Oct 15, 2024
  21. Taylor BlauOct 16, 2024
  22. 3/6 doc: update-ref: demote symlink to last sectionkristofferhaugsbakk@fastmail.com, Oct 15, 2024
  23. 4/6 doc: update-ref: remove confusing paragraphkristofferhaugsbakk@fastmail.com, Oct 15, 2024
  24. Taylor BlauOct 16, 2024
  25. Kristoffer HaugsbakkOct 16, 2024
  26. Taylor BlauOct 16, 2024
  27. 5/6 doc: update-ref: discuss symbolic linkskristofferhaugsbakk@fastmail.com, Oct 15, 2024
  28. Kristoffer HaugsbakkOct 15, 2024
  29. Taylor BlauOct 16, 2024
  30. 6/6 doc: mutually link update-ref and symbolic-refkristofferhaugsbakk@fastmail.com, Oct 15, 2024
  31. Bence FerdinandyOct 16, 2024
  32. Taylor BlauOct 16, 2024
  33. Kristoffer HaugsbakkOct 16, 2024
  34. 0/6 doc: update-ref: amend old material and discuss symrefskristofferhaugsbakk@fastmail.com, Oct 19, 2024
  35. 1/6 Documentation/git-update-ref.txt: drop “flag”kristofferhaugsbakk@fastmail.com, Oct 19, 2024
  36. karthik nayakOct 20, 2024
  37. 2/6 Documentation/git-update-ref.txt: remove safety paragraphskristofferhaugsbakk@fastmail.com, Oct 19, 2024
  38. karthik nayakOct 20, 2024
  39. Kristoffer HaugsbakkOct 20, 2024
  40. Kristoffer HaugsbakkOct 20, 2024
  41. 3/6 Documentation/git-update-ref.txt: demote symlink to last sectionkristofferhaugsbakk@fastmail.com, Oct 19, 2024
  42. 4/6 Documentation/git-update-ref.txt: remove confusing paragraphkristofferhaugsbakk@fastmail.com, Oct 19, 2024
  43. 5/6 Documentation/git-update-ref.txt: discuss symbolic refskristofferhaugsbakk@fastmail.com, Oct 19, 2024
  44. 6/6 Documentation: mutually link update-ref and symbolic-refkristofferhaugsbakk@fastmail.com, Oct 19, 2024
  45. karthik nayakOct 20, 2024
  46. 0/6 doc: update-ref: amend old material and discuss symrefskristofferhaugsbakk@fastmail.com, Oct 21, 2024
  47. 1/6 Documentation/git-update-ref.txt: drop “flag”kristofferhaugsbakk@fastmail.com, Oct 21, 2024
  48. 2/6 Documentation/git-update-ref.txt: remove safety paragraphskristofferhaugsbakk@fastmail.com, Oct 21, 2024
  49. 3/6 Documentation/git-update-ref.txt: demote symlink to last sectionkristofferhaugsbakk@fastmail.com, Oct 21, 2024
  50. 4/6 Documentation/git-update-ref.txt: remove confusing paragraphkristofferhaugsbakk@fastmail.com, Oct 21, 2024
  51. 5/6 Documentation/git-update-ref.txt: discuss symbolic refskristofferhaugsbakk@fastmail.com, Oct 21, 2024
  52. 6/6 Documentation: mutually link update-ref and symbolic-refkristofferhaugsbakk@fastmail.com, Oct 21, 2024
  53. Taylor BlauOct 21, 2024
  54. Andreas SchwabOct 12, 2024

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.