path: root/xdiff/xdiff.h
diff options
authorMark Wooding <>2006-03-28 02:23:31 (GMT)
committerJunio C Hamano <>2006-03-28 02:43:51 (GMT)
commitacb725772964ee11656543a28c303e9aa6d092c5 (patch)
treef2b53ddc3d0b5640819a4c6d10ee6c6c6d4ee37e /xdiff/xdiff.h
parent9c48666aa0745c666593bb7383e17f78c43eb36d (diff)
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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'xdiff/xdiff.h')
1 files changed, 3 insertions, 0 deletions
diff --git a/xdiff/xdiff.h b/xdiff/xdiff.h
index 71cb939..2540e8a 100644
--- a/xdiff/xdiff.h
+++ b/xdiff/xdiff.h
@@ -35,6 +35,8 @@ extern "C" {
#define XDL_PATCH_MODEMASK ((1 << 8) - 1)
+#define XDL_EMIT_FUNCNAMES (1 << 0)
#define XDL_MMB_READONLY (1 << 0)
#define XDL_MMF_ATOMIC (1 << 0)
@@ -65,6 +67,7 @@ typedef struct s_xdemitcb {
typedef struct s_xdemitconf {
long ctxlen;
+ unsigned long flags;
} xdemitconf_t;
typedef struct s_bdiffparam {