Subject: Re: bug? round-trip through fast-import/fast-export loses files

From: Junio C Hamano <[email-masked]>
Date: Tue, 21 Mar 2023 10:07:53 -0700

Elijah Newren <[email-masked]> writes:

> Honestly, looking back at those two patches of mine, I think both were
> rather suboptimal.  A better solution that would handle both F->D and
> D->F would be having fast-export sort the diff_filepairs such that it
> processes the deletes before the modifies.  Another improved solution
> would be having fast-import sort the files given to it and handling
> deletes first.  Either should fix this.

Reminds me of the trick we had to invent for "git apply", where we
process deletions first and then creation, to avoid the exact
problem of creating "foo" while removing "foo/bar" ;-)