diff: clarify textconv interface
commita64e6a44c63a965c5bc26242ddd3ed049b42e117
authorJeff King <peff@peff.net>
Mon, 22 Feb 2016 18:28:54 +0000 (22 13:28 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Feb 2016 18:40:35 +0000 (22 10:40 -0800)
tree7bf3c3388e48bcbc548da65a688ba2425afc42f0
parenta2558fb8e1e387b630312311e1d22c95663da5d0
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>
diff.c
diff.h
userdiff.h