From: Stefan Haller Date: Mon, 20 Mar 2023 08:42:18 GMT Subject: Re: When exactly should REBASE_HEAD exist? Message-ID: <66bcf561-b604-db2b-fa0c-fa9fbc379562@haller-berlin.de> In-Reply-To: <1e943dab-23c7-9eed-df4c-c89084d2387b@haller-berlin.de> On 20.03.23 08:29, Stefan Haller wrote: > Ah, thanks for coming up with this tricky case. I'm leaning towards > simply ignoring it, since (at least for my usage of git) it's very > uncommon; if I use "-x make test" to check all commits, I almost always > do that in place, so I won't get conflicts. On the other hand, it seems easy enough to do it properly, so why not. Something like this: num_done := len(done) is_rescheduled := # for new versions of git: done[num_done - 1] == todo[0] # for older versions of git: || (num_done >= 3 && done[num_done - 2] == todo[0] && done[num_done - 1] == done[num_done - 3]) Could I be missing any other cases with this logic? -Stefan