From: Patrick Steinhardt Date: Mon, 16 Feb 2026 06:39:10 GMT Subject: Re: [PATCH v2 3/5] builtin/history: replace "--ref-action=print" with "--dry-run" Message-ID: In-Reply-To: <315801b6-bc9e-42b4-8356-12fd8b83223c@app.fastmail.com> On Fri, Feb 13, 2026 at 06:30:10PM +0100, Kristoffer Haugsbakk wrote: [snip] > > Besides usability issues, it also has another issue: the dry-run mode > > will always operate as if the user wanted to rewrite all branches. But > > in fact, the user also has the option to only update the HEAD reference, > > and they might want to perform a dry-run of such an operation, too. We > > could of course introduce "--ref-actoin=print-head", but that would > > s/--ref-actoin/--ref-action/ Indeed, I've queued this fix locally and will send it out with the next version. > >[snip] > > +`--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. > > `HEAD` is mentioned here because it could be detached `HEAD`. So you > can’t just say the current branch. > > “the current `HEAD` reference” seems a bit much. Is this less precise? It's not, but this commit doesn't rewrite any of the description, it only deletes the sentence that becomes out-of-date now. So I'd prefer to keep this as-is if you don't mind. If you feel strongly I'm happy to add another commit on top. Thanks! Patrick