1
0
mirror of https://github.com/git/git.git synced 2024-09-29 17:51:22 +02:00
git/xdiff
Mark Wooding acb7257729 xdiff: Show function names in hunk headers.
The speed of the built-in diff generator is nice; but the function names
shown by `diff -p' are /really/ nice.  And I hate having to choose.  So,
we hack xdiff to find the function names and print them.

xdiff has grown a flag to say whether to dig up the function names.  The
builtin_diff function passes this flag unconditionally.  I suppose it
could parse GIT_DIFF_OPTS, but it doesn't at the moment.  I've also
reintroduced the `function name' into the test suite, from which it was
removed in commit 3ce8f089.

The function names are parsed by a particularly stupid algorithm at the
moment: it just tries to find a line in the `old' file, from before the
start of the hunk, whose first character looks plausible.  Still, it's
most definitely a start.

Signed-off-by: Mark Wooding <mdw@distorted.org.uk>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-27 18:43:51 -08:00
..
xdiff.h xdiff: Show function names in hunk headers. 2006-03-27 18:43:51 -08:00
xdiffi.c
xdiffi.h
xemit.c xdiff: Show function names in hunk headers. 2006-03-27 18:43:51 -08:00
xemit.h
xinclude.h xdiff: Show function names in hunk headers. 2006-03-27 18:43:51 -08:00
xmacros.h
xprepare.c
xprepare.h
xtypes.h
xutils.c xdiff: Show function names in hunk headers. 2006-03-27 18:43:51 -08:00
xutils.h xdiff: Show function names in hunk headers. 2006-03-27 18:43:51 -08:00