From: Jeff King Date: Tue, 07 Apr 2026 04:24:32 GMT Subject: Re: [WIP PATCH] fast-export: emit deletions first Message-ID: <20260407042432.GA627864@coredump.intra.peff.net> In-Reply-To: On Mon, Apr 06, 2026 at 02:44:05PM -0700, Elijah Newren wrote: > > It's also possible that sorting should be the responsibility of the > > receiver. I.e., should fast-import see: > > > > M 100644 :blob_label a/b > > D a > > > > and figure it out? Or maybe we want both (to help other consumers of > > fast-export, but also to help fast-import when consuming output of other > > sources). > > Would re-ordering on fast-import's side introduce bugs or violate > user's assumptions? Right now, fast-import has no check to prevent > more than one command for the same pathname being given, and has a > last-entry-wins ruling. Thus filemodify PATH followed by filedelete > PATH gives different results than reversing the order. Most probably > wouldn't care or want to ever do that, but I could see it as a way of > allowing you to change your mind in the stream and override an earlier > directive you sent. Hmm, good point. It probably is better to leave the reading side as-is, then, to be on the safe side. -Peff