]> git.ipfire.org Git - thirdparty/git.git/blobdiff - convert.h
convert: make convert_attrs() and convert structs public
[thirdparty/git.git] / convert.h
index e29d1026a6866b63b047b6838727bcb71ea6eccb..5678e99922fd0643e3890d4113f26feff38b4bee 100644 (file)
--- a/convert.h
+++ b/convert.h
@@ -63,6 +63,30 @@ struct checkout_metadata {
        struct object_id blob;
 };
 
+enum convert_crlf_action {
+       CRLF_UNDEFINED,
+       CRLF_BINARY,
+       CRLF_TEXT,
+       CRLF_TEXT_INPUT,
+       CRLF_TEXT_CRLF,
+       CRLF_AUTO,
+       CRLF_AUTO_INPUT,
+       CRLF_AUTO_CRLF
+};
+
+struct convert_driver;
+
+struct conv_attrs {
+       struct convert_driver *drv;
+       enum convert_crlf_action attr_action; /* What attr says */
+       enum convert_crlf_action crlf_action; /* When no attr is set, use core.autocrlf */
+       int ident;
+       const char *working_tree_encoding; /* Supported encoding or default encoding if NULL */
+};
+
+void convert_attrs(const struct index_state *istate,
+                  struct conv_attrs *ca, const char *path);
+
 extern enum eol core_eol;
 extern char *check_roundtrip_encoding;
 const char *get_cached_convert_stats_ascii(const struct index_state *istate,