git-debrebase: Fix wrong use of real directory as playtree
This is my fix for #1116933 "workarea recursion mishandling can result in strange behaviours".
I think this is a sufficiently serious bug that I want to do a stable update for it (not just a backport).
@spwhitton, would you please review these commits, so we can have confidence that the fix is right? I have tested them commit-by-commit. (And I've checked that they apply cleanly to our trixie
branch.)
Empirically this plus explicitly pinning the timestamps fixes the strange behaviours I saw while working on #1116600. That bug involves nested vanilla merges. I have a test case as part of the fix to #116600 but gdr currently can't handle that situation and I don't propose to make that fix part of a stable update; the consequence is simply that gdr fails to resolve the merge, which is annoying but not hazardous. So this branch's change in behaviour isn't formally tested here in this MR. I don't know of a way to trigger the problematic recursion other than nested vanilla merges.
ETA: a sufficiently unlaundered input to a vanilla merge is sufficient, apparently. So this MR now does contain a test that fails before and passes after.