On Fri, 18 Sep 2020 at 13:37, Jeff King <peff@xxxxxxxx> wrote: > On Fri, Sep 18, 2020 at 11:10:45AM -0400, Thomas Guyot-Sionnest wrote: > > if (one->size == two->size && > !memcmp(one->data, two->data, one->size)) > > is what you'd want. > I think the other approach has its merits too - AFAIK if you run this from a git repo and one of the files is tracked by it (or even both if you compare two files within the repo) the oid will be readily available and usable if the file hasn't been modified. If there is no big objection I could stick with the hybrid approach, using memcmp of course. - it's also the easiest fix. -- Thomas