]> git.ipfire.org Git - thirdparty/git.git/commit
Allow alternate "low-level" emit function from xdl_diff
authorBrian Downing <bdowning@lavos.net>
Sat, 25 Oct 2008 13:30:54 +0000 (15:30 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sat, 25 Oct 2008 19:09:31 +0000 (12:09 -0700)
commitef2e62fe23173586f49a00c6ae953ebbdb0d13ab
tree13c9c71347563800dc9dfb025ad97bfcffb804f7
parent9ccd0a88ac3ea13ac2df4630bfd01c02084f965e
Allow alternate "low-level" emit function from xdl_diff

For some users (e.g. git blame), getting textual patch output is just
extra work, as they can get all the information they need from the low-
level diff structures.  Allow for an alternate low-level emit function
to be defined to allow bypassing the textual patch generation; set
xemitconf_t's emit_func member to enable this.

The (void (*)()) type is pretty ugly, but the alternative would be to
include most of the private xdiff headers in xdiff.h to get the types
required for the "proper" function prototype.  Also, a (void *) won't
work, as ANSI C doesn't allow a function pointer to be cast to an
object pointer.

Signed-off-by: Brian Downing <bdowning@lavos.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
xdiff/xdiff.h
xdiff/xdiffi.c
xdiff/xemit.c
xdiff/xemit.h