summaryrefslogtreecommitdiff
path: root/xdiff/xutils.h
diff options
context:
space:
mode:
authorMark Wooding <mdw@distorted.org.uk>2006-03-28 03:23:31 +0100
committerJunio C Hamano <junkio@cox.net>2006-03-27 18:43:51 -0800
commitacb725772964ee11656543a28c303e9aa6d092c5 (patch)
treef2b53ddc3d0b5640819a4c6d10ee6c6c6d4ee37e /xdiff/xutils.h
parent9c48666aa0745c666593bb7383e17f78c43eb36d (diff)
downloadgit-acb725772964ee11656543a28c303e9aa6d092c5.tar.gz
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>
Diffstat (limited to 'xdiff/xutils.h')
-rw-r--r--xdiff/xutils.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/xdiff/xutils.h b/xdiff/xutils.h
index 428a4bb1ef..55b0d39f49 100644
--- a/xdiff/xutils.h
+++ b/xdiff/xutils.h
@@ -36,7 +36,8 @@ unsigned long xdl_hash_record(char const **data, char const *top);
unsigned int xdl_hashbits(unsigned int size);
int xdl_num_out(char *out, long val);
long xdl_atol(char const *str, char const **next);
-int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2, xdemitcb_t *ecb);
+int xdl_emit_hunk_hdr(long s1, long c1, long s2, long c2,
+ const char *func, long funclen, xdemitcb_t *ecb);