Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] diff --no-index: support more than one file pair

From: Matthieu Moy <hidden>
Date: 2016-06-15 22:52:47

Nguyen Thai Ngoc Duy [off-list ref] writes:
quoted
quoted
 - 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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help