Re: [PATCH v2 1/1] replay: make atomic ref updates the default behavior
- From
Siddharth Asthana <siddharthasthana31@gmail.com>
- Date
- Oct 8, 2025, 20:06 UTC
- Message-ID
- <ea7aa170-400c-47fa-b3f0-2623fcbfcaea@gmail.com>
- In-Reply-To
- <xmqqh5wfu3o6.fsf@gitster.g>
On 04/10/25 02:02, Junio C Hamano wrote:
Show 15 quoted lines
> Elijah Newren <newren@gmail.com> writes: > >>> For naming, I am thinking either: >>> - replay.updateRefs (boolean: true = update, false = output-commands) >>> - replay.defaultOutput (string: "update" | "commands") >>> >>> The boolean feels simpler, but the string might be more extensible if we >>> add other output modes later. Which pattern feels more consistent with >>> existing Git config conventions? Looking at rebase.* they're mostly >>> boolean toggles, but am I missing a better example to follow? >> replay.updateRefs sounds better to me. defaultOutput with "update" >> doesn't make sense to me. > Yup. Or "replay.defaultAction = (update-ref | show-comamnds)" if we > anticipate that we might have a third option someday. That would of > course affect the choice of the command line option.
That's interesting. Between: - replay.updateRefs (boolean) - replay.defaultAction (enum string)
The enum is more extensible, but do we actually anticipate other modes? Elijah's --format idea from Kristoffer might be a third mode eventually, but that seems far off.
I am leaning toward the simpler replay.updateRefs boolean for now, but if you think the extensibility is worth it, I can go with defaultAction. What's your preference?