#include "pkt-line.h"
#include "sub-process.h"
#include "utf8.h"
+#include "ll-merge.h"
/*
* convert.c - convert a file when checking it out and checking it in.
const char *working_tree_encoding; /* Supported encoding or default encoding if NULL */
};
+static struct attr_check *check;
+
static void convert_attrs(const struct index_state *istate,
struct conv_attrs *ca, const char *path)
{
- static struct attr_check *check;
struct attr_check_item *ccheck = NULL;
if (!check) {
ca->crlf_action = CRLF_AUTO_INPUT;
}
+void reset_parsed_attributes(void)
+{
+ struct convert_driver *drv, *next;
+
+ attr_check_free(check);
+ check = NULL;
+ reset_merge_attributes();
+
+ for (drv = user_convert; drv; drv = next) {
+ next = drv->next;
+ free((void *)drv->name);
+ free(drv);
+ }
+ user_convert = NULL;
+ user_convert_tail = NULL;
+}
+
int would_convert_to_git_filter_fd(const struct index_state *istate, const char *path)
{
struct conv_attrs ca;