Merge branch 'jk/combine-diff-binary-etc' into maint

* jk/combine-diff-binary-etc:
  combine-diff: respect textconv attributes
  refactor get_textconv to not require diff_filespec
  combine-diff: handle binary files as binary
  combine-diff: calculate mode_differs earlier
  combine-diff: split header printing into its own function
This commit is contained in:
Junio C Hamano
2011-08-16 11:23:24 -07:00
5 changed files with 376 additions and 83 deletions

14
diff.c
View File

@ -1984,19 +1984,7 @@ struct userdiff_driver *get_textconv(struct diff_filespec *one)
return NULL;
diff_filespec_load_driver(one);
if (!one->driver->textconv)
return NULL;
if (one->driver->textconv_want_cache && !one->driver->textconv_cache) {
struct notes_cache *c = xmalloc(sizeof(*c));
struct strbuf name = STRBUF_INIT;
strbuf_addf(&name, "textconv/%s", one->driver->name);
notes_cache_init(c, name.buf, one->driver->textconv);
one->driver->textconv_cache = c;
}
return one->driver;
return userdiff_get_textconv(one->driver);
}
static void builtin_diff(const char *name_a,