Thomas Gummerer <t.gummerer@xxxxxxxxx> writes: > On 07/11, Junio C Hamano wrote: >> Thomas Gummerer <t.gummerer@xxxxxxxxx> writes: >> >> > Fix that behaviour by using 'git restore' which can faithfully restore >> > the index and working tree. This also simplifies the code. >> >> Hmph. I would have preferred to see we stayed away from 'restore' >> (and used 'checkout' instead, if you must use a Porcelain command), >> so that the "fix" can go to maintenance tracks, if distro packagers >> choose to backport it. > > Fair enough. I thought this wouldn't even go to 'maint', since the > bug exists since a while, so 'git restore' would be fine, but didn't > think of distro packagers. I'm happy to use 'checkout' here instead. As long as the "--no-overlay" option is used, it is not much better. Backporting the fix goes only back to 2.22 and no earlier.