From f192223447746a503bf664135a0e537d15876ebe Mon Sep 17 00:00:00 2001 From: John Keeping Date: Thu, 7 Feb 2013 20:15:26 +0000 Subject: diff: add diff_line_prefix function This is a helper function to call the diff output_prefix function and return its value as a C string, allowing us to greatly simplify everywhere that needs to get the output prefix. Signed-off-by: John Keeping Signed-off-by: Junio C Hamano --- diff.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'diff.h') diff --git a/diff.h b/diff.h index a47bae48d5..76830e28b4 100644 --- a/diff.h +++ b/diff.h @@ -174,6 +174,9 @@ const char *diff_get_color(int diff_use_color, enum color_diff ix); diff_get_color((o)->use_color, ix) +const char *diff_line_prefix(struct diff_options *); + + extern const char mime_boundary_leader[]; extern void diff_tree_setup_paths(const char **paths, struct diff_options *); -- cgit v1.2.1