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

Re: [PATCH] fast-import: catch deletion of non-existent file in input

From
Jeff King <peff@peff.net>
Date
Jul 16, 2012, 00:26 UTC
Message-ID
<20120716002652.GA27304@sigill.intra.peff.net>
In-Reply-To
<20120715181151.GA1986@burratino>
On Sun, Jul 15, 2012 at 01:11:51PM -0500, Jonathan Nieder wrote:
Show 8 quoted lines
> > Subject: fast-import: catch deletion of non-existent file in input
> [...]
> > We silently ignored the bogus "D foo" directive, and the
> > resulting tree incorrectly contained "bar". With this patch,
> > we notice the bogus input and die.
> 
> This breaks svn-fe, which relies on the existing semantics when asked
> to copy an empty directory.

Thanks for the report. I had a worry while writing this that somebody was relying on the behavior. Let's just drop it, then. It's nice to catch errors in exporters, but not at the expense of compatibility issues.

We could introduce a new feature bit, but I'm not sure it is really worthwhile. The older versions of bzr-fast-export would not set the bit anyway, and newer versions are already fixed, so it is kind of closing the barn door after the horse has left (we might catch other bugs, but this one is kind of oddly specific; if somebody wanted to audit fast-import for other similar cases and introduce a "strict" feature bit, that might be worthwhile. But for this single change, I don't think so).

> Let's repeat that for emphasis: API breaks in fast-import not guarded
> with a new "feature" type are not ok.

Totally agree. The question in my mind was whether this was a bug fix or an API change, and it sounds like it is too far towards the latter.

-Peff
Previous: Jonathan Nieder
Message 9 of 9 in “Export from bzr / Import to git results in a deleted file re-appearing”
  1. Felix NatterJul 12, 2012
  2. Jeff KingJul 12, 2012
  3. Andreas SchwabJul 13, 2012
  4. Jeff KingJul 13, 2012
  5. Andreas SchwabJul 13, 2012
  6. Felix NatterJul 14, 2012
  7. fast-import: catch deletion of non-existent file in inputJeff King, Jul 15, 2012
  8. Jonathan NiederJul 15, 2012
  9. Jeff KingJul 16, 2012

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.