File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66#include "hash.h"
77#include "advice.h"
88#include "gettext.h"
9+ #include "convert.h"
910
1011#include SHA1_HEADER
1112#ifndef git_SHA_CTX
@@ -582,35 +583,6 @@ extern int fsync_object_files;
582583extern int core_preload_index ;
583584extern int core_apply_sparse_checkout ;
584585
585- enum safe_crlf {
586- SAFE_CRLF_FALSE = 0 ,
587- SAFE_CRLF_FAIL = 1 ,
588- SAFE_CRLF_WARN = 2
589- };
590-
591- extern enum safe_crlf safe_crlf ;
592-
593- enum auto_crlf {
594- AUTO_CRLF_FALSE = 0 ,
595- AUTO_CRLF_TRUE = 1 ,
596- AUTO_CRLF_INPUT = -1
597- };
598-
599- extern enum auto_crlf auto_crlf ;
600-
601- enum eol {
602- EOL_UNSET ,
603- EOL_CRLF ,
604- EOL_LF ,
605- #ifdef NATIVE_CRLF
606- EOL_NATIVE = EOL_CRLF
607- #else
608- EOL_NATIVE = EOL_LF
609- #endif
610- };
611-
612- extern enum eol core_eol ;
613-
614586enum branch_track {
615587 BRANCH_TRACK_UNSPECIFIED = -1 ,
616588 BRANCH_TRACK_NEVER = 0 ,
@@ -1153,14 +1125,6 @@ extern void trace_strbuf(const char *key, const struct strbuf *buf);
11531125
11541126void packet_trace_identity (const char * prog );
11551127
1156- /* convert.c */
1157- /* returns 1 if *dst was used */
1158- extern int convert_to_git (const char * path , const char * src , size_t len ,
1159- struct strbuf * dst , enum safe_crlf checksafe );
1160- extern int convert_to_working_tree (const char * path , const char * src , size_t len , struct strbuf * dst );
1161- extern int renormalize_buffer (const char * path , const char * src , size_t len , struct strbuf * dst );
1162- extern int can_bypass_conversion (const char * path );
1163-
11641128/* add */
11651129/*
11661130 * return 0 if success, 1 - if addition of a file failed and
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2011, Google Inc.
3+ */
4+ #ifndef CONVERT_H
5+ #define CONVERT_H
6+
7+ enum safe_crlf {
8+ SAFE_CRLF_FALSE = 0 ,
9+ SAFE_CRLF_FAIL = 1 ,
10+ SAFE_CRLF_WARN = 2
11+ };
12+
13+ extern enum safe_crlf safe_crlf ;
14+
15+ enum auto_crlf {
16+ AUTO_CRLF_FALSE = 0 ,
17+ AUTO_CRLF_TRUE = 1 ,
18+ AUTO_CRLF_INPUT = -1
19+ };
20+
21+ extern enum auto_crlf auto_crlf ;
22+
23+ enum eol {
24+ EOL_UNSET ,
25+ EOL_CRLF ,
26+ EOL_LF ,
27+ #ifdef NATIVE_CRLF
28+ EOL_NATIVE = EOL_CRLF
29+ #else
30+ EOL_NATIVE = EOL_LF
31+ #endif
32+ };
33+
34+ extern enum eol core_eol ;
35+
36+ /* returns 1 if *dst was used */
37+ extern int convert_to_git (const char * path , const char * src , size_t len ,
38+ struct strbuf * dst , enum safe_crlf checksafe );
39+ extern int convert_to_working_tree (const char * path , const char * src ,
40+ size_t len , struct strbuf * dst );
41+ extern int renormalize_buffer (const char * path , const char * src , size_t len ,
42+ struct strbuf * dst );
43+ extern int can_bypass_conversion (const char * path );
44+ #endif /* CONVERT_H */
You can’t perform that action at this time.
0 commit comments