userdiff.c: remove implicit dependency on the_index

[jc: squashed in missing forward decl in userdiff.h found by Ramsay]

Helped-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy
2018-09-21 17:57:33 +02:00
committed by Junio C Hamano
parent 35843b1123
commit acd00ea049
11 changed files with 61 additions and 41 deletions

View File

@ -3,6 +3,8 @@
#include "notes-cache.h"
struct index_state;
struct userdiff_funcname {
const char *pattern;
int cflags;
@ -21,7 +23,8 @@ struct userdiff_driver {
int userdiff_config(const char *k, const char *v);
struct userdiff_driver *userdiff_find_by_name(const char *name);
struct userdiff_driver *userdiff_find_by_path(const char *path);
struct userdiff_driver *userdiff_find_by_path(struct index_state *istate,
const char *path);
/*
* Initialize any textconv-related fields in the driver and return it, or NULL