提交 aac1d7b8 编写于 作者: A Andreas Gruenbacher 提交者: Junio C Hamano

fetch: Check for a "^{}" suffix with suffixcmp()

Otherwise, we will check random bytes for ref names < 3 characters.
Signed-off-by: NAndreas Gruenbacher <agruen@suse.de>
Signed-off-by: NJunio C Hamano <gitster@pobox.com>
上级 e9bd3235
......@@ -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) &&
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册