On Tue, 23 Jan 2007, Johannes Schindelin wrote: > > P.S.: These patches make me dream of yet another diff format enhancement: > code moves! It's basically impossible. Why? You need the context. In a _context_less_ diff, it's fairly trivial to indicate code movement: you just say "move bytes x-y into z". However, if you want anything approaching readability and safety, you want context, and that automatically means that you need to have the stuff around the context, which in turn means that you can't sanely do that. Sure, you could do a diff that has the *context* repeated around the code that moves (and not actually quoting all the movement itself, except for the first and last three lines or something), but that would be really unreadable. A lot more unreadable than what we have now, with delete+add chunks. > Of course, for this to be really usable, you'd also have to > automatically determine indent changes... Indeed. Much code movement isn't just pure data movement, it's re-indentation too. Making the thing even less tractable. In other words - you can do it (and we _do_ do it) when you don't do diffs at all, but deltas. Our deltas actually do contain block movement. But diffs? Forget about it. > You may say I'm a dreamer. But I'm not the only one... I am the walrus. Linus - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html