author | Linus Torvalds <torvalds@linux-foundation.org> | |
Fri, 21 Dec 2007 04:22:46 +0000 (20:22 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 21 Dec 2007 04:54:23 +0000 (20:54 -0800) | ||
commit | d2f82950a9226ae1102a7a97f03440a4bf8c6c09 | |
tree | f93cf439b0d6de5cc258c20ff6152e9746773f36 | tree | snapshot |
parent | d76a585d83aeb6910e7eb10d36b406dc27202675 | commit | diff |
Re(-re)*fix trim_common_tail()
The tar-ball and the git archive itself is fine, but yes, the diff from
2.6.23 to 2.6.24-rc6 is bad. It's the "trim_common_tail()" optimization
that has caused way too much pain.
Very interesting breakage. The patch was actually "correct" in a (rather
limited) technical sense, but the context at the end was missing because
while the trim_common_tail() code made sure to keep enough common context
to allow a valid diff to be generated, the diff machinery itself could
decide that it could generate the diff differently than the "obvious"
solution.
Thee sad fact is that the git optimization (which is very important for
"git blame", which needs no context), is only really valid for that one
case where we really don't need any context.
[jc: since this is shared with "git diff -U0" codepath, context recovery
to the end of line needs to be done even for zero context case.]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
The tar-ball and the git archive itself is fine, but yes, the diff from
2.6.23 to 2.6.24-rc6 is bad. It's the "trim_common_tail()" optimization
that has caused way too much pain.
Very interesting breakage. The patch was actually "correct" in a (rather
limited) technical sense, but the context at the end was missing because
while the trim_common_tail() code made sure to keep enough common context
to allow a valid diff to be generated, the diff machinery itself could
decide that it could generate the diff differently than the "obvious"
solution.
Thee sad fact is that the git optimization (which is very important for
"git blame", which needs no context), is only really valid for that one
case where we really don't need any context.
[jc: since this is shared with "git diff -U0" codepath, context recovery
to the end of line needs to be done even for zero context case.]
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff-interface.c | diff | blob | history |