From 39d18fe676382cf29ea08427b8ad4527ef51a4bb Mon Sep 17 00:00:00 2001 From: Etienne Samson Date: Wed, 31 Jul 2019 08:37:10 +0200 Subject: smart: use push_glob instead of manual filtering The code worked under the assumption that anything under `refs/tags` are tag objects, and all the rest would be peelable to a commit. As it is completely valid to have tags to blobs under a non `refs/tags` ref, this would cause failures when trying to peel a tag to a commit. Fix the broken filtering by switching to `git_revwalk_push_glob`, which already handles this case. --- tests/resources/testrepo.git/refs/blobs/annotated_tag_to_blob | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/resources/testrepo.git/refs/blobs/annotated_tag_to_blob (limited to 'tests/resources') diff --git a/tests/resources/testrepo.git/refs/blobs/annotated_tag_to_blob b/tests/resources/testrepo.git/refs/blobs/annotated_tag_to_blob new file mode 100644 index 000000000..6c146d6e3 --- /dev/null +++ b/tests/resources/testrepo.git/refs/blobs/annotated_tag_to_blob @@ -0,0 +1 @@ +521d87c1ec3aef9824daf6d96cc0ae3710766d91 -- cgit v1.2.1