Subject: Re: [PATCH] diff: add a config option to control orderfile

From: "Michael S. Tsirkin" <[email-masked]>
Date: Tue, 17 Sep 2013 19:42:26 +0300

On Tue, Sep 17, 2013 at 09:26:13AM -0700, Junio C Hamano wrote:
> "Michael S. Tsirkin" <[email-masked]> writes:
> 
> > Actually, after I've looked at the code,
> > diffcore_order is already already called for patch-id.
> 
> That was a band-aid for an ill-thought-out orderfile misfeature to
> hide the breakage.  You somehow make sure that you pass the same
> orderfile to diff generating machinery used internal to patch-id
> generation.  The standalone "git patch-id" would be reading the
> patch in the order you give it when you are feeding a patch somebody
> sent you via the mailing list using an order unknown to you, no?

Yes but that's already the case, right?
People don't have to use git to generate patches.

So might it not be useful to tweak patch id to
sort the diff, making it a bit more stable?
This means it needs to pass twice over the file, but is this
a huge issue?
pass 1 - get offsets of chunks and sort them
pass 2 - seek each chunk and hash

what do you think?

> Before making it _easier_ to use the orderfile to generate diffs, we
> would need to prepare the parts that will be broken by wider use of
> the feature.

I'll be glad to help do this if you tell me what these parts are.
anything else besides fixing besides the stand-alone patch id?

-- 
MST