]> git.ipfire.org Git - thirdparty/git.git/blobdiff - convert.c
convert: fix typo
[thirdparty/git.git] / convert.c
index deb6f71b2d164fc87dab3b741da34dde98c51374..c0b09258fe578b2d6e4646348626bf088caec07c 100644 (file)
--- a/convert.c
+++ b/convert.c
@@ -290,8 +290,8 @@ static int validate_encoding(const char *path, const char *enc,
                        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)
@@ -310,8 +310,8 @@ static int validate_encoding(const char *path, const char *enc,
                                "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)
@@ -1946,7 +1946,7 @@ static struct stream_filter *ident_filter(const struct object_id *oid)
  * 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,