Re: [WIP PATCH] fast-export: emit deletions first
- From
Raymond E. Pasco <ray@ameretat.dev>
- Date
- Apr 7, 2026, 21:28 UTC
- Message-ID
- <qrxjw6qtagcfcwbzqjkoy37nu22no6kteskge3lpoyxmumzfqv@35hyc7dys63c>
- In-Reply-To
- <CABPp-BHhXQc-s8rF1n+AQ0VodX2KuiahcAOcg2msR1eZrUSsCA@mail.gmail.com>
On 26/04/06 02:44PM, Elijah Newren wrote:
> On the creator side, I agree that fast-export would definitely want to > sort its deletes before modifies to avoid D/F conflict issues. That > doesn't help with renames, but I agree with you that the answer for > renames is probably "then don't do that."
fast-export does force 'R'enames (of a to b) to appear after other lines operating on a, 4ce6fb80 (fast-export: ensure that a renamed file is printed after all references).
I think all Ds first works for the patterns fast-export actually uses. According to a comment, the reason it's sorting by depth at all is a subset of this, to put D a/b before M 120000 a, or similar.
The additional roundtripping tests I'm writing should handle all this, I hope. I think now is a good time to get round-trips down, since people might potentially use fast-export | fast-import to switch hash functions (when commit and tag resigning are fully in fast-import).