Re: [PATCH 3/5] refactor userdiff textconv code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jeff King
Date: Friday, October 24, 2008 - 3:50 pm

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
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Document the textconv filter., Matthieu Moy, (Sat Sep 27, 7:06 pm)
[PATCH] Add a basic test for the textconv filter., Matthieu Moy, (Sat Sep 27, 7:06 pm)
Re: [PATCH] Document the textconv filter., Johannes Sixt, (Sun Sep 28, 4:07 am)
Re: [PATCH] Document the textconv filter., Matthieu Moy, (Sun Sep 28, 5:29 am)
[PATCH 0/4] diff text conversion filter, Jeff King, (Sun Oct 5, 2:41 pm)
[PATCH 1/4] t4012: use test_cmp instead of cmp, Jeff King, (Sun Oct 5, 2:42 pm)
Re: [PATCH 0/4] diff text conversion filter, Johannes Sixt, (Sun Oct 5, 11:29 pm)
Re: [PATCH 0/4] diff text conversion filter, Jeff King, (Sun Oct 5, 11:52 pm)
Re: [PATCH 0/4] diff text conversion filter, Johannes Sixt, (Mon Oct 6, 1:55 am)
Re: [PATCH 0/4] diff text conversion filter, Matthieu Moy, (Mon Oct 6, 8:15 am)
Re: [PATCH 0/4] diff text conversion filter, Jeff King, (Mon Oct 6, 6:20 pm)
Re: [PATCH 0/4] diff text conversion filter, Johannes Sixt, (Mon Oct 6, 10:52 pm)
Re: [PATCH 0/4] diff text conversion filter, Jeff King, (Mon Oct 6, 11:00 pm)
Re: [PATCH 0/4] diff text conversion filter, Matthieu Moy, (Mon Oct 6, 11:15 pm)
Re: [PATCH 0/4] diff text conversion filter, Jeff King, (Tue Oct 7, 8:46 am)
Re: [PATCH 0/4] diff text conversion filter, Johannes Sixt, (Tue Oct 7, 9:15 am)
Re: [PATCH 3/4] diff: introduce diff.<driver>.binary, Junio C Hamano, (Sat Oct 11, 10:24 pm)
Re: [PATCH 0/4] diff text conversion filter, Jeff King, (Sun Oct 12, 6:29 pm)
Re: [PATCH 3/4] diff: introduce diff.<driver>.binary, Junio C Hamano, (Sun Oct 12, 9:00 pm)
Re: [PATCH 3/4] diff: introduce diff.<driver>.binary, Johannes Sixt, (Sun Oct 12, 11:10 pm)
Re: [PATCH 3/4] diff: introduce diff.<driver>.binary, Junio C Hamano, (Mon Oct 13, 6:54 am)
[PATCH 1/5] diff: add missing static declaration, Jeff King, (Thu Oct 23, 7:48 pm)
[PATCH 2/5] add userdiff textconv tests, Jeff King, (Thu Oct 23, 7:50 pm)
[PATCH 3/5] refactor userdiff textconv code, Jeff King, (Thu Oct 23, 7:53 pm)
Re: [PATCH 3/4] diff: introduce diff.<driver>.binary, Johannes Sixt, (Fri Oct 24, 12:02 am)
Re: [PATCH 3/5] refactor userdiff textconv code, Johannes Sixt, (Fri Oct 24, 12:15 am)
Re: [PATCH 3/5] refactor userdiff textconv code, Jeff King, (Fri Oct 24, 5:40 am)
Re: [PATCH 3/5] refactor userdiff textconv code, Jeff King, (Fri Oct 24, 6:51 am)
Re: [PATCH 3/5] refactor userdiff textconv code, Johannes Sixt, (Fri Oct 24, 7:01 am)
Re: [PATCH 3/5] refactor userdiff textconv code, Jeff King, (Fri Oct 24, 7:08 am)
Re: [PATCH 3/5] refactor userdiff textconv code, Junio C Hamano, (Fri Oct 24, 2:12 pm)
Re: [PATCH 3/5] refactor userdiff textconv code, Jeff King, (Fri Oct 24, 3:50 pm)
Re: [PATCH 3/5] refactor userdiff textconv code, Jeff King, (Fri Oct 24, 3:56 pm)
Re: [PATCH 3/5] refactor userdiff textconv code, Jeff King, (Fri Oct 24, 5:48 pm)
[PATCH 1/7] diff: add missing static declaration, Jeff King, (Fri Oct 24, 5:50 pm)
[PATCH 2/7] add userdiff textconv tests, Jeff King, (Fri Oct 24, 5:51 pm)
[PATCH 7/7] only textconv regular files, Jeff King, (Fri Oct 24, 5:55 pm)
Re: [PATCH 4/7] textconv: don't convert for every operation, Junio C Hamano, (Fri Oct 24, 10:41 pm)