diff: clarify textconv interface
The memory allocation scheme for the textconv interface is a bit tricky, and not well documented. It was originally designed as an internal part of diff.c (matching fill_mmfile), but gradually was made public. Refactoring it is difficult, but we can at least improve the situation by documenting the intended flow and enforcing it with an in-code assertion. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a2558fb8e1
commit
a64e6a44c6
@ -23,6 +23,10 @@ int userdiff_config(const char *k, const char *v);
|
||||
struct userdiff_driver *userdiff_find_by_name(const char *name);
|
||||
struct userdiff_driver *userdiff_find_by_path(const char *path);
|
||||
|
||||
/*
|
||||
* Initialize any textconv-related fields in the driver and return it, or NULL
|
||||
* if it does not have textconv enabled at all.
|
||||
*/
|
||||
struct userdiff_driver *userdiff_get_textconv(struct userdiff_driver *driver);
|
||||
|
||||
#endif /* USERDIFF */
|
||||
|
Reference in New Issue
Block a user