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

Re: [PATCH 3/4] builtin/history: replace "--ref-action=print" with "--dry-run"

From
Patrick Steinhardt <ps@pks.im>
Date
Feb 13, 2026, 05:50 UTC
Message-ID
<aY67u1Iks4iPBMgl@pks.im>
In-Reply-To
<CALnO6CBterXWjecpRG7jTc4PaHDJLuY_FyrA0URC0TXBWSXgHQ@mail.gmail.com>
On Thu, Feb 12, 2026 at 05:20:13PM -0500, D. Ben Knoble wrote:
Show 25 quoted lines
> On Thu, Feb 12, 2026 at 7:45 AM Patrick Steinhardt <ps@pks.im> wrote:
> > diff --git a/Documentation/git-history.adoc b/Documentation/git-history.adoc
> > index 154e262b76..33353815cb 100644
> > --- a/Documentation/git-history.adoc
> > +++ b/Documentation/git-history.adoc
> > @@ -60,13 +60,15 @@ The following commands are available to rewrite history in different ways:
> >  OPTIONS
> >  -------
> >
> > -`--ref-action=(branches|head|print)`::
> > +`--dry-run`::
> > +       Do not update any references, but instead print any ref updates in a
> > +       format that can be consumed by linkgit:git-update-ref[1].
> > +
> > +`--ref-action=(branches|head)`::
> >         Control which references will be updated by the command, if any. With
> >         `branches`, all local branches that point to commits which are
> >         descendants of the original commit will be rewritten. With `head`, only
> > -       the current `HEAD` reference will be rewritten. With `print`, all
> > -       updates as they would be performed with `branches` are printed in a
> > -       format that can be consumed by linkgit:git-update-ref[1].
> > +       the current `HEAD` reference will be rewritten.
> 
> Unrelated to this series, I've just realized I can't tell from these
> docs what the default --ref-action is. The code says "branches."
Good point indeed. I'll add another patch on top, thanks!
Patrick
Previous: D. Ben KnobleNext: Patrick Steinhardt
Message 16 of 34 in “builtin/history: some smaller UI improvements”
  1. 0/4 builtin/history: some smaller UI improvementsPatrick Steinhardt, Feb 12, 2026
  2. 1/4 builtin/history: perform revwalk checks before asking for user inputPatrick Steinhardt, Feb 12, 2026
  3. Junio C HamanoFeb 12, 2026
  4. Patrick SteinhardtFeb 13, 2026
  5. Junio C HamanoFeb 13, 2026
  6. 2/4 builtin/history: check for merges before asking for user inputPatrick Steinhardt, Feb 12, 2026
  7. D. Ben KnobleFeb 12, 2026
  8. Junio C HamanoFeb 12, 2026
  9. Patrick SteinhardtFeb 13, 2026
  10. Patrick SteinhardtFeb 13, 2026
  11. Ben KnobleFeb 13, 2026
  12. 3/4 builtin/history: replace "--ref-action=print" with "--dry-run"Patrick Steinhardt, Feb 12, 2026
  13. Junio C HamanoFeb 12, 2026
  14. Patrick SteinhardtFeb 13, 2026
  15. D. Ben KnobleFeb 12, 2026
  16. Patrick SteinhardtFeb 13, 2026
  17. 4/4 builtin/history: rename "--ref-action=" to "--update-refs="Patrick Steinhardt, Feb 12, 2026
  18. 0/5 builtin/history: some smaller UI improvementsPatrick Steinhardt, Feb 13, 2026
  19. 1/5 builtin/history: perform revwalk checks before asking for user inputPatrick Steinhardt, Feb 13, 2026
  20. Junio C HamanoFeb 13, 2026
  21. 2/5 builtin/history: check for merges before asking for user inputPatrick Steinhardt, Feb 13, 2026
  22. 3/5 builtin/history: replace "--ref-action=print" with "--dry-run"Patrick Steinhardt, Feb 13, 2026
  23. Kristoffer HaugsbakkFeb 13, 2026
  24. Patrick SteinhardtFeb 16, 2026
  25. Kristoffer HaugsbakkFeb 18, 2026
  26. 4/5 builtin/history: rename "--ref-action=" to "--update-refs="Patrick Steinhardt, Feb 13, 2026
  27. 5/5 Documentation/git-history: document default for "--update-refs="Patrick Steinhardt, Feb 13, 2026
  28. Junio C HamanoFeb 13, 2026
  29. 0/5 builtin/history: some smaller UI improvementsPatrick Steinhardt, Feb 16, 2026
  30. 1/5 builtin/history: perform revwalk checks before asking for user inputPatrick Steinhardt, Feb 16, 2026
  31. 2/5 builtin/history: check for merges before asking for user inputPatrick Steinhardt, Feb 16, 2026
  32. 3/5 builtin/history: replace "--ref-action=print" with "--dry-run"Patrick Steinhardt, Feb 16, 2026
  33. 4/5 builtin/history: rename "--ref-action=" to "--update-refs="Patrick Steinhardt, Feb 16, 2026
  34. 5/5 Documentation/git-history: document default for "--update-refs="Patrick Steinhardt, Feb 16, 2026

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.