From: Junio C Hamano Date: Thu, 14 Aug 2008 00:46:29 GMT Subject: Re: [PATCH 1/2] Make xdiff_outf_{init,release} interface Message-ID: <7vljz0iftm.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080813070508.GB4396@lavos.net> Brian Downing writes: > @@ -103,6 +110,10 @@ int xdiff_outf(void *priv_, mmbuffer_t *mb, int nbuf) > return 0; > } > > +void xdiff_outf_release(void *priv_) > +{ > +} > + It might make it more clear to have this function take a pointer to "struct xdiff_emit_state", which is always the first member of the callback private data structure. Although I wish xdi_diff() could do the necessary clean-up immediately before it returns (so that the caller did not have to do anything special), it is not possible to do so cleanly, because there are "outf" implementations other than xdiff_outf that do not even use "struct xdiff_emit_state" in their callbacks. So I think your patch makes sense. Thanks.