fetch: Check for a "^{}" suffix with suffixcmp()
[gitweb.git] / builtin-fetch.c
index b059d652c6c04cc1d09395698b7d00ed793872cb..0acf80991b57226d44305fd51f2c32544130dc91 100644 (file)
@@ -588,7 +588,7 @@ static void find_non_local_tags(struct transport *transport,
                 * to fetch then we can mark the ref entry in the list
                 * as one to ignore by setting util to NULL.
                 */
-               if (!strcmp(ref->name + strlen(ref->name) - 3, "^{}")) {
+               if (!suffixcmp(ref->name, "^{}")) {
                        if (item && !has_sha1_file(ref->old_sha1) &&
                            !will_fetch(head, ref->old_sha1) &&
                            !has_sha1_file(item->util) &&