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

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

From
Kkristofferhaugsbakk@fastmail.com <kristofferhaugsbakk@fastmail.com>
Date
Oct 21, 2024, 20:47 UTC
Message-ID
<cover.1729543007.git.code@khaugsbakk.name>
In-Reply-To
<cover.1729367469.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 v3
• Diff changes (see interdiff):
  • Add missing word “that”
• Patch “remove confusing paragraph”
  • Rewrite message to emphasize ref backends
• Patch “drop “flag” ”:
  • Add missing word “that”
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 v2:
diff --git a/Documentation/git-update-ref.txt b/Documentation/git-update-ref.txt
index c64d80f5a2d..8a4281cde9f 100644
--- a/Documentation/git-update-ref.txt
+++ b/Documentation/git-update-ref.txt
@@ -34,7 +34,7 @@ committed in the same transaction.
 If --no-deref is given, <ref> itself is overwritten, rather than
 the result of following the symbolic pointers.
 
-With `-d`, it deletes the named <ref> after verifying it
+With `-d`, it deletes the named <ref> after verifying that it
 still contains <old-oid>.
 
 With `--stdin`, update-ref reads instructions from standard input and
Range-diff against v2:
1:  91c1cae3209 ! 1:  9c40351950f Documentation/git-update-ref.txt: drop “flag”
    @@ Commit message
     
         The other paragraphs on options say “With <option>,”.  Let’s be uniform.
     
    +    Also add missing word “that”.
    +
         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
     
      ## Notes (series) ##
    +    v3:
    +    • Also add missing “that”: “after verifying *that*”
    +
    +      Link: https://lore.kernel.org/git/CAOLa=ZTJqcEOQm8Ns58t6DxEXYn2ws__HDRRAaAhsBkJJFLXmg@mail.gmail.com/
         v2:
         • Message: tweak
         • Not done: paragraph wrapping.  I found something else in this
    @@ Documentation/git-update-ref.txt: for reading but not for writing (so we'll neve
      archive by creating a symlink tree).
      
     -With `-d` flag, it deletes the named <ref> after verifying it
    -+With `-d`, it deletes the named <ref> after verifying it
    ++With `-d`, it deletes the named <ref> after verifying that it
      still contains <old-oid>.
      
      With `--stdin`, update-ref reads instructions from standard input and
2:  71d1e6364a2 ! 2:  bb14c427f81 Documentation/git-update-ref.txt: remove safety paragraphs
    @@ Commit message
         Remove paragraphs which explain that using this command is safer than
         echoing the branch name into `HEAD`.
     
    -    These paragraphs have been part of the documentation since the
    -    documentation was created in 129056370ab (Add missing documentation.,
    -    2005-10-04), back when the command synopsis was a lot simpler:
    +    Evoking the echo strategy is wrong now under the reftable backend since
    +    this file does not exist.  And the ref file backend majority user base
    +    use porcelain commands to manage `HEAD` unless they are intentionally
    +    poking at the implementation.
     
    -        `git-update-ref` <ref> <newvalue> [<oldvalue>]
    +    Maybe this warning was relevant for the usage patterns when it was
    +    added[1] but now it just takes up space.
     
    -    These paragraphs don’t interrupt the flow of the document on that
    -    revision since it is at the end.  Now though it is placed after the
    -    description of `--no-deref` and before `-d` and `--stdin`.  Covering all
    -    the options is more generally interesting than a safety note about a
    -    naïve `HEAD` management.
    -
    -    Such a safety warning is also much less relevant now, considering that
    -    everyone who isn’t intentionally poking at the internal implementation
    -    is using porcelain commands to manage `HEAD`.
    +    † 1: 129056370ab (Add missing documentation., 2005-10-04)
     
         Signed-off-by: Kristoffer Haugsbakk <code@khaugsbakk.name>
     
    +
    + ## Notes (series) ##
    +    v3:
    +    • Change commit message: ref backends
    +
    +      Link: https://lore.kernel.org/git/bcb0e2d8-ebee-4835-aa43-05107199ee62@app.fastmail.com/#t
    +
      ## Documentation/git-update-ref.txt ##
     @@ Documentation/git-update-ref.txt: somewhere else with a regular filename).
      If --no-deref is given, <ref> itself is overwritten, rather than
    @@ Documentation/git-update-ref.txt: somewhere else with a regular filename).
     -ref symlink to some other tree, if you have copied a whole
     -archive by creating a symlink tree).
     -
    - With `-d`, it deletes the named <ref> after verifying it
    + With `-d`, it deletes the named <ref> after verifying that it
      still contains <old-oid>.
      
3:  ca786bff978 = 3:  6c8ff72c230 Documentation/git-update-ref.txt: demote symlink to last section
4:  769fd20945d = 4:  f6a70b3f70a Documentation/git-update-ref.txt: remove confusing paragraph
5:  ca5ece5336c = 5:  5033ec82586 Documentation/git-update-ref.txt: discuss symbolic refs
6:  fd3c7585a0f = 6:  aa1ee4a8ee0 Documentation: mutually link update-ref and symbolic-ref

base-commit: ef8ce8f3d4344fd3af049c17eeba5cd20d98b69f
-- 
2.46.1.641.g54e7913fcb6
Previous: karthik nayakNext: kristofferhaugsbakk@fastmail.com
Message 46 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.