From: Matthieu Moy Date: Thu, 12 Jan 2012 18:26:27 GMT Subject: Re: [PATCH] diff --no-index: support more than one file pair Message-ID: In-Reply-To: Nguyen Thai Ngoc Duy writes: >>>  - hell, i might even benefit from git copy/modify detection >> >> I don't see how, if you specify explicitely the pairs (old, new). You >> may have such benefit if you let the command-line express "here's a >> bunch of old files, and a bunch of new ones", but not with your proposed >> syntax. > > That's what git gives to diff machinery: a set of file pairs, and the > diff machinery has to figure out copy/modify pairs, shuffling them up > if necessary. I simply cut of tree traversal part out and feed file > pairs directly to diff machinery. If you want to benefit from copy detection, you cannot hardcode the fact that you have as many source and destination files. And even to benefit from rename detection, I find the user interface really weird. If I provide files in pairs, I really don't expect Git to shuffle them like git diff --no-index A1 B1 A2 B2 --- A1 +++ B2 .. --- A2 +++ B1 .. -- Matthieu Moy http://www-verimag.imag.fr/~moy/