Bert Huijben wrote:
> > -----Original Message-----
> > From: Julian Foad [mailto:julian.foad_at_wandisco.com]
> > On Tue, 2011-08-02 at 16:23 +0200, Bert Huijben wrote:
> > > > -----Original Message-----
> > > > From: Julian Foad [mailto:julian.foad_at_wandisco.com]
> > > > First I wondered why the delta_editor_t isn't a suitable interface for
> > > > diffs, and why the WC defines its own 'callback' type for this. One
> > > > reason is because we want a symmetric diff, one that provides the full
> > > > content of both what's added and what's deleted. Although the
> > > > summarizing diff doesn't need to know about file content or property
> > > > deletions, it does want to know about file and directory deletions, so
> > > > that would seem to be a good thing. So why aren't we using the
> > > > diff_callbacks_t here?
> > >
> > > Maybe because the diff callbacks transfer the full texts of both
> > > before and after a change to provide them to the callback?
> >
> > It appears that the diff_callbacks_t can already avoid that: the
> > 'file_opened' callback says:
> >
> > /* This function is called before @a file_changed to allow callbacks to
> > * skip the most expensive processing of retrieving the file data. */
>
> If you do that (returning skip status) you don't get the information
> on text and property changes.
>
> How would you generate the summary without those callbacks being
> invoked?
I guess you can't. So you're right, this is one reason why we're not
using the current set of diff callbacks.
- Julian
Received on 2011-08-02 17:18:03 CEST