Re: [PATCH 1/2] sequencer: teach autostash apply to report conflicts
- From
- phillip.wood123@gmail.com <phillip.wood123@gmail.com>
- Date
- Aug 31, 2026, 13:15 UTC
- Message-ID
- <4813f6a6-69f0-48ff-9558-6339949efdd3@gmail.com>
- In-Reply-To
- <CAHwyqnVDBihNE8+tbJheO3R5TgfBUgqLHRx=zDxwT3btUi2NZA@mail.gmail.com>
On 31/08/2026 11:18, Harald Nordgren wrote:
Show 11 quoted lines
>>> Add a conflicted parameter to apply_save_autostash_oid() and >>> apply_save_autostash_ref() so callers can learn whether applying the >>> stash resulted in conflicts. Thread the parameter through >>> apply_autostash_ref() and update existing callers to pass NULL. >> >> It would be nicer to use the return value to indicate >> success/error/conflicts rather than adding yet another parameter. Apart >> from that this looks good. > > Is the int flexible enough to separate autostash conflict from other > errors? Or should we introduce an enum here?
I think a tri-state enum would be clearest - the callers are only interested it "stash applied without conflicts", "stash applied with conflicts" and "something went wrong - could not apply stash"
Thanks
Phillip