git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2023, 17:07 UTC
Message-ID
<xmqqh6uejamu.fsf@gitster.g>
In-Reply-To
<CABPp-BEG+vp-UcpVfcZecPBnfcuTjO6JYCo7wEU5ZrDUHBUd9g@mail.gmail.com>
Elijah Newren <newren@gmail.com> writes:
Show 6 quoted lines
> 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" ;-)

Previous: Priedhorsky, ReidNext: Jeff King
Message 4 of 6 in “bug? round-trip through fast-import/fast-export loses files”
  1. Priedhorsky, ReidMar 20, 2023
  2. Elijah NewrenMar 21, 2023
  3. Priedhorsky, ReidMar 21, 2023
  4. Junio C HamanoMar 21, 2023
  5. Jeff KingMar 21, 2023
  6. Elijah NewrenMar 22, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.