From: Junio C Hamano Date: Fri, 21 Oct 2005 06:16:21 GMT Subject: Re: Split up tree diff functions into tree-diff.c library Message-ID: <7v64rr2y4q.fsf@assigned-by-dhcp.cox.net> In-Reply-To: I have not closely studied the user of this change, rev-list, but I have a hunch that you might be better off, if you define a new diff "format", DIFF_FORMAT_CALLBACK, and hook into diff_flush(), instead of hooking into diff_addremove() and diff_change(). Instead of calling diff_flush_raw() or diff_flush_name(), or diff_flush_patch(), your callback function would be called with each filepair. Right now, you are only making the parallel tree traversing and comparing part from diff-tree available in the library form (which is fine), but that way leaves the door open for it to also use the rest of the diffcore machinery. By doing things this way, later round of rev-list that culls uninteresting commits could be taught to also follow renames. Am I grossly off the mark?