Reduce cost of deletion in levenstein distance (4 -> 3)
[git.git] / diff.h
diff --git a/diff.h b/diff.h
index dd48eca71ddf1a8709135f158520c8bb7cd5f8d1..e027650cb0ff2651e2e890e7f00753c15f5b3cff 100644 (file)
--- a/diff.h
+++ b/diff.h
@@ -91,6 +91,8 @@ typedef struct strbuf *(*diff_prefix_fn_t)(struct diff_options *opt, void *data)
 #define DIFF_XDL_SET(opts, flag)    ((opts)->xdl_opts |= XDF_##flag)
 #define DIFF_XDL_CLR(opts, flag)    ((opts)->xdl_opts &= ~XDF_##flag)
 
+#define DIFF_WITH_ALG(opts, flag)   (((opts)->xdl_opts & ~XDF_DIFF_ALGORITHM_MASK) | XDF_##flag)
+
 enum diff_words_type {
        DIFF_WORDS_NONE = 0,
        DIFF_WORDS_PORCELAIN,
@@ -150,6 +152,7 @@ struct diff_options {
        diff_format_fn_t format_callback;
        void *format_callback_data;
        diff_prefix_fn_t output_prefix;
+       int output_prefix_length;
        void *output_prefix_data;
 };