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

Re: [PATCH 1/5] revisions.txt: document more special refs

From
Taylor Blau <me@ttaylorr.com>
Date
Apr 14, 2023, 21:14 UTC
Message-ID
<ZDnCMegeiw0kT5oj@nand.local>
In-Reply-To
<ebcf2426-db40-e967-9db5-532869cac8ff@github.com>
On Fri, Apr 14, 2023 at 12:49:16PM -0700, Victoria Dye wrote:
> To help with that, you could create visual separation in the rendered doc by
> adding a '+' between each special ref description; converting them into a
> bullet pointed list would also work, I think.

In case you're looking for another option, you could convert these into a description list, which would be consistent with the outer-most list in this document.

I had to refresh myself on how the spacing and continuations work in ASCIIdoc, but I think the following (which applies on top of this patch) is right:

--- 8< ---
diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
index 98b8f89bc8..b34f981622 100644
--- a/Documentation/revisions.txt
+++ b/Documentation/revisions.txt
@@ -30,7 +30,7 @@ characters and to avoid word splitting.
   explicitly say 'heads/master' to tell Git which one you mean.
   When ambiguous, a '<refname>' is disambiguated by taking the
   first match in the following rules:
-
++
   . If '$GIT_DIR/<refname>' exists, that is what you mean (this is usually
     useful only for `HEAD`, `FETCH_HEAD`, `ORIG_HEAD`, `MERGE_HEAD`,
     `REBASE_HEAD`, `REVERT_HEAD`, `CHERRY_PICK_HEAD` and `BISECT_HEAD`);
@@ -44,26 +44,34 @@ characters and to avoid word splitting.
   . otherwise, 'refs/remotes/<refname>' if it exists;

   . otherwise, 'refs/remotes/<refname>/HEAD' if it exists.
+
 +
-`HEAD` names the commit on which you based the changes in the working tree.
-`FETCH_HEAD` records the branch which you fetched from a remote repository
-with your last `git fetch` invocation.
-`ORIG_HEAD` is created by commands that move your `HEAD` in a drastic
-way (`git am`, `git merge`, `git rebase`, `git reset`),
-to record the position of the `HEAD` before their operation, so that
-you can easily change the tip of the branch back to the state before you ran
-them.
-`MERGE_HEAD` records the commit(s) which you are merging into your branch
-when you run `git merge`.
-`REBASE_HEAD`, during a rebase, records the commit at which the
-operation is currently stopped, either because of conflicts or an `edit`
-command in an interactive rebase.
-`REVERT_HEAD` records the commit which you are reverting when you
-run `git revert`.
-`CHERRY_PICK_HEAD` records the commit which you are cherry-picking
-when you run `git cherry-pick`.
-`BISECT_HEAD` records the current commit to be tested when you
-run `git bisect --no-checkout`.
+  `HEAD`:::
+    names the commit on which you based the changes in the working tree.
+  `FETCH_HEAD`:::
+    records the branch which you fetched from a remote repository with
+    your last `git fetch` invocation.
+  `ORIG_HEAD`:::
+    is created by commands that move your `HEAD` in a drastic way (`git
+    am`, `git merge`, `git rebase`, `git reset`), to record the position
+    of the `HEAD` before their operation, so that you can easily change
+    the tip of the branch back to the state before you ran them.
+  `MERGE_HEAD`:::
+    records the commit(s) which you are merging into your branch when you
+    run `git merge`.
+  `REBASE_HEAD`:::
+    during a rebase, records the commit at which the operation is
+    currently stopped, either because of conflicts or an `edit` command in
+    an interactive rebase.
+  `REVERT_HEAD`:::
+    records the commit which you are reverting when you run `git revert`.
+  `CHERRY_PICK_HEAD`:::
+    records the commit which you are cherry-picking when you run `git
+    cherry-pick`.
+  `BISECT_HEAD`:::
+    records the current commit to be tested when you run `git bisect
+    --no-checkout`.
+
 +
 Note that any of the 'refs/*' cases above may come either from
 the `$GIT_DIR/refs` directory or from the `$GIT_DIR/packed-refs` file.
--- >8 ---

Thanks,
Taylor
Previous: Victoria DyeNext: Felipe Contreras
Message 6 of 35 in “Document 'AUTO_MERGE' and more special refs”
  1. 0/5 Document 'AUTO_MERGE' and more special refsPhilippe Blain via GitGitGadget, Apr 14, 2023
  2. 1/5 revisions.txt: document more special refsPhilippe Blain via GitGitGadget, Apr 14, 2023
  3. Junio C HamanoApr 14, 2023
  4. Felipe ContrerasApr 15, 2023
  5. Victoria DyeApr 14, 2023
  6. Taylor BlauApr 14, 2023
  7. Felipe ContrerasApr 15, 2023
  8. 3/5 git-merge.txt: modernize word choice in "True merge" sectionPhilippe Blain via GitGitGadget, Apr 14, 2023
  9. Junio C HamanoApr 14, 2023
  10. 2/5 completion: complete REVERT_HEAD and BISECT_HEADPhilippe Blain via GitGitGadget, Apr 14, 2023
  11. Junio C HamanoApr 14, 2023
  12. 5/5 completion: complete AUTO_MERGEPhilippe Blain via GitGitGadget, Apr 14, 2023
  13. 4/5 Documentation: document AUTO_MERGEPhilippe Blain via GitGitGadget, Apr 14, 2023
  14. Taylor BlauApr 14, 2023
  15. Eric SunshineApr 15, 2023
  16. Elijah NewrenApr 15, 2023
  17. Eric SunshineApr 15, 2023
  18. Elijah NewrenApr 16, 2023
  19. Elijah NewrenApr 15, 2023
  20. Philippe BlainApr 15, 2023
  21. Elijah NewrenApr 15, 2023
  22. Junio C HamanoApr 14, 2023
  23. Victoria DyeApr 14, 2023
  24. Elijah NewrenApr 15, 2023
  25. Chris TorekApr 16, 2023
  26. 0/6 Document 'AUTO_MERGE' and more special refsPhilippe Blain via GitGitGadget, May 22, 2023
  27. 1/6 revisions.txt: use description list for special refsPhilippe Blain via GitGitGadget, May 22, 2023
  28. 2/6 revisions.txt: document more special refsPhilippe Blain via GitGitGadget, May 22, 2023
  29. 4/6 git-merge.txt: modernize word choice in "True merge" sectionPhilippe Blain via GitGitGadget, May 22, 2023
  30. 3/6 completion: complete REVERT_HEAD and BISECT_HEADPhilippe Blain via GitGitGadget, May 22, 2023
  31. 5/6 Documentation: document AUTO_MERGEPhilippe Blain via GitGitGadget, May 22, 2023
  32. 6/6 completion: complete AUTO_MERGEPhilippe Blain via GitGitGadget, May 22, 2023
  33. Elijah NewrenJun 1, 2023
  34. Junio C HamanoJun 1, 2023
  35. Junio C HamanoJun 1, 2023

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.