Re: [PATCH v7 3/4] sequencer: teach autostash apply to take optional conflict marker labels
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 9, 2026, 17:32 UTC
- Message-ID
- <xmqq1pgoujiz.fsf@gitster.g>
- In-Reply-To
- <c0d6b4b4c0a53af2fd76d23e04c540418ddd086d.1775741265.git.gitgitgadget@gmail.com>
"Harald Nordgren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 7 quoted lines
> From: Harald Nordgren <haraldnordgren@gmail.com> > > Add label1, label2, and label_ancestor parameters to the autostash > apply machinery so callers can pass custom conflict marker labels > through to "git stash apply --ours-label/--theirs-label/--base-label". > Introduce apply_autostash_ref_with_labels() for callers that want > to pass labels.
It is just a naming thing, but the contrast between label[12] vs label_ancestor feel a bit uneven. Wouldn't it make it easier to grok a hunk like this, if you stick to ours/theirs/base terminlogy?
Show 6 quoted lines
> + if (label1) > + strvec_pushf(&child.args, "--ours-label=%s", label1); > + if (label2) > + strvec_pushf(&child.args, "--theirs-label=%s", label2); > + if (label_ancestor) > + strvec_pushf(&child.args, "--base-label=%s", label_ancestor);
Alternatively, if you prefer a conciseness of numbered names, it is customary to use "1" for the common ancestor, "2" for ours, and "3" for theirs, following the same model after how higher stage index entries are used during a conflicting merge.
Other than that, this step is quite straight-forward and looking good.