| 172 | } |
| 173 | |
| 174 | static enum eol output_eol(enum convert_crlf_action crlf_action) |
| 175 | { |
| 176 | switch (crlf_action) { |
| 177 | case CRLF_BINARY: |
| 178 | return EOL_UNSET; |
| 179 | case CRLF_TEXT_CRLF: |
| 180 | return EOL_CRLF; |
| 181 | case CRLF_TEXT_INPUT: |
| 182 | return EOL_LF; |
| 183 | case CRLF_UNDEFINED: |
| 184 | case CRLF_AUTO_CRLF: |
| 185 | return EOL_CRLF; |
| 186 | case CRLF_AUTO_INPUT: |
| 187 | return EOL_LF; |
| 188 | case CRLF_TEXT: |
| 189 | case CRLF_AUTO: |
| 190 | /* fall through */ |
| 191 | return text_eol_is_crlf() ? EOL_CRLF : EOL_LF; |
| 192 | } |
| 193 | warning(_("illegal crlf_action %d"), (int)crlf_action); |
| 194 | return core_eol; |
| 195 | } |
| 196 | |
| 197 | static void check_global_conv_flags_eol(const char *path, |
| 198 | struct text_stat *old_stats, struct text_stat *new_stats, |
no test coverage detected