const char *stripped = NULL;
char *upper = xstrdup_toupper(enc);
upper[strlen(upper)-2] = '\0';
- if (!skip_prefix(upper, "UTF-", &stripped))
- skip_prefix(stripped, "UTF", &stripped);
+ if (skip_prefix(upper, "UTF", &stripped))
+ skip_prefix(stripped, "-", &stripped);
advise(advise_msg, path, stripped);
free(upper);
if (die_on_error)
"working-tree-encoding.");
const char *stripped = NULL;
char *upper = xstrdup_toupper(enc);
- if (!skip_prefix(upper, "UTF-", &stripped))
- skip_prefix(stripped, "UTF", &stripped);
+ if (skip_prefix(upper, "UTF", &stripped))
+ skip_prefix(stripped, "-", &stripped);
advise(advise_msg, path, stripped, stripped);
free(upper);
if (die_on_error)
* the contents cannot be filtered without reading the whole thing
* in-core.
*
- * Note that you would be crazy to set CRLF, smuge/clean or ident to a
+ * Note that you would be crazy to set CRLF, smudge/clean or ident to a
* large binary blob you would want us not to slurp into the memory!
*/
struct stream_filter *get_stream_filter(const struct index_state *istate,