From: Stefan Sperling Subject: Re: tog diff view search To: Tracey Emery Cc: gameoftrees@openbsd.org Date: Sat, 1 Feb 2020 18:24:07 +0100 On Sat, Feb 01, 2020 at 09:07:34AM -0700, Tracey Emery wrote: > Since we're diffing, there is no call to got_object_blob_dump_to_file. > We either diff objects as blobs, trees, or commits, and write that diff > to the filestream. So, either those three functions could be tasked with > the duties, which seems like a lot of work through the tree, or add the > new function, which is based on got_object_blob_dump_to_file. Ah, yes I see. Yes, what I had in mind when I first looked at this some time ago was generating the necessary info inside the diff functions. But that does indeed seem to be a lot of extra work inside diff. Which is not ideal since we're planning on replacing the diff code soon anyway. So a separate function seems better indeed. > If we decide to add the new function, it should probably be moved to > tog.c and called something more specific like, dump_diff_filestream_info, > or something. It's not diff-specific. Ideally the function could be run on any text file and return line number and offset information, and its name should reflect this generality. Any tog view which displays a file could use this.