SIGN IN SIGN UP

test(worktree): ask the platform instead of assuming it is this one

Windows CI caught both of these, and the first one caught it fairly: the
predicate test asserted `C:repo` was ordinary "because unix has no path
prefixes", which is true of the machine it was written on and not of the
one the guard exists for. Windows read the drive prefix and refused the
path, exactly as designed — so the assertion now states that outcome per
platform, and the branch I could not exercise locally is covered.

The second was a test measuring the platform rather than the code: `git
worktree list` prints forward slashes on Windows while the fixture path
holds backslashes, and a temp directory can come back short-named, so the
string never matched even though nothing had been pruned. Ask git inside
the checkout instead — a swept worktree cannot answer for its own HEAD —
which compares nothing and says the same thing.

Both are test-only. The removal behavior they cover was already correct
on Windows: everything asserted before the failing lines passed there.
X
xintaofei committed
ea9a8e2d869a894370ff010676d675c5a542337b
Parent: 0ae2b84