On Fri, Oct 21, 2016 at 07:27:40AM +0200, Johannes Sixt wrote:
> Am 20.10.2016 um 23:38 schrieb Jeff King:
> > test_cmp () {
> > # optimize for common "they are the same" case
> > # without any subshells or subprograms
>
> We do this already on Windows; it's the function mingw_test_cmp in our test
> suite:
> https://github.com/git/git/blob/master/t/test-lib-functions.sh#L884-L945
Ah, thanks, I didn't even think to look for an existing solution like
this. Looks like it was done for LF/CRLF reasons, though, not
performance. I wonder if anybody has measured whether it improves things
there or not.
-Peff