cherry-pick: Suggest a better method to retain authorship
[gitweb.git] / http-fetch.c
index 9f790a08e5d2760524ab7a34e98071062b3ed42f..e6cd11db737e1ed79c3b60d33674c6e0ce38af55 100644 (file)
@@ -717,8 +717,8 @@ static int fetch_indices(struct alt_base *repo)
                case 'P':
                        i++;
                        if (i + 52 <= buffer.posn &&
-                           !strncmp(data + i, " pack-", 6) &&
-                           !strncmp(data + i + 46, ".pack\n", 6)) {
+                           !prefixcmp(data + i, " pack-") &&
+                           !prefixcmp(data + i + 46, ".pack\n")) {
                                get_sha1_hex(data + i + 6, sha1);
                                setup_index(repo, sha1);
                                i += 51;