On Fri, Oct 24, 2008 at 02:12:17PM -0700, Junio C Hamano wrote:
I thought about that. My reasoning against it was two-fold:
1. We don't want to keep two copies in memory unnecessarily. Of
course, we could easily free the original, but just store the
information in a different pointer to make sure they never get
confused. So that is a non-issue.
2. I had some vague notion that it is more convenient in the long run
to do this to the filespec, since we can then transparently pass the
munged filespec around and pretend like the converted text was the
original content.
However, I'm not sure exactly _where_ we would want to do this.
The obvious places are for patch, for diffstat, or for whitespace
checking. But all of those places use mmfile, so we can munge them
in the same way. I haven't looked at using this with blame, but I do
think "git blame --textconv foo.jpg" would be useful.
(Actually not true. I did just look for 30 seconds at using this
with blame, but blame doesn't seem to to use builtin_diff at all).
I think your example would work fine, if there is no other advantage to
having a transparently-munged diff_filespec (as above).
-Peff
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html