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

Re: [BUG/PATCH] t9350-fast-export: Add failing test for symlink-to-directory

From
Jeff King <peff@peff.net>
Date
Aug 24, 2015, 05:25 UTC
Message-ID
<20150824052548.GA14403@sigill.intra.peff.net>
In-Reply-To
<alpine.DEB.2.10.1508211238570.31851@buzzword-bingo.mit.edu>
On Fri, Aug 21, 2015 at 12:47:30PM -0400, Anders Kaseorg wrote:
Show 23 quoted lines
> On Fri, 21 Aug 2015, Jeff King wrote:
> >   - we may still have the opposite problem with renames. That is, a
> >     rename is _also_ a deletion, but will go to the end. So I would
> >     expect renaming the symlink "foo" to "bar" and then adding
> >     "foo/world" would end up with:
> > 
> >        M 100644 :3 foo/world
> >        R foo bar
> > 
> >     (because we push renames to the end in our sort). And indeed,
> >     importing that does seem to get it wrong (we end up with "bar/world"
> >     and no symlink).
> > 
> > We can't fix the ordering in the second case without breaking the first
> > case. So I'm not sure it's fixable on the fast-export end.
> 
> Hmm, renames have a more fundamental ordering problem: swapping two 
> (normal) files and using fast-export -C -B results in
> 
>   R foo bar
>   R bar foo
> 
> which cannot be reimported correctly without fast-import fixes.

Yeah, you're right. Fast-export's view of the world comes from diff, which is that the "source" side is immutable. Whereas fast-import seems to mutate the tree in-place as it reads the set of operations. I wonder what would break if we simply fixed that. I.e., is anybody else depending on:

  R foo bar
  M bar ...

to modify "foo" and not "bar". I kind of wonder if it is insane to turn on renames at all in fast-export.

-Peff
Previous: Anders Kaseorg
Message 4 of 4 in “t9350-fast-export: Add failing test for symlink-to-directory”
  1. t9350-fast-export: Add failing test for symlink-to-directoryAnders Kaseorg, Aug 19, 2015
  2. Jeff KingAug 21, 2015
  3. Anders KaseorgAug 21, 2015
  4. Jeff KingAug 24, 2015

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.