summaryrefslogtreecommitdiff
path: root/tests/refs/peel.c
Commit message (Collapse)AuthorAgeFilesLines
* object_type: use new enumeration namesethomson/index_fixesEdward Thomson2018-12-011-38/+38
| | | | Use the new object_type enumeration names within the codebase.
* refs: do not use peeled OID if peeling to a tagPatrick Steinhardt2017-10-061-0/+12
| | | | | | | | | | | | | | | | | | | | | | If a reference stored in a packed-refs file does not directly point to a commit, tree or blob, the packed-refs file will also will include a fully-peeled OID pointing to the first underlying object of that type. If we try to peel a reference to an object, we will use that peeled OID to speed up resolving the object. As a reference for an annotated tag does not directly point to a commit, tree or blob but instead to the tag object, the packed-refs file will have an accomodating fully-peeled OID pointing to the object referenced by that tag. When we use the fully-peeled OID pointing to the referenced object when peeling, we obviously cannot peel that to the tag anymore. Fix this issue by not using the fully-peeled OID whenever we want to peel to a tag. Note that this does not include the case where we want to resolve to _any_ object type. Existing code may make use from the fact that we resolve those to commit objects instead of tag objects, even though that behaviour is inconsistent between packed and loose references. Furthermore, some tests of ours make the assumption that we in fact resolve those references to a commit.
* peel: reject bad queries with EINVALIDSPECcmn/peeling-errorsCarlos Martín Nieto2014-11-221-1/+1
| | | | | | | | | | There are some combination of objects and target types which we know cannot be fulfilled. Return EINVALIDSPEC for those to signify that there is a mismatch in the user-provided data and what the object model is capable of satisfying. If we start at a tag and in the course of peeling find out that we cannot reach a particular type, we return EPEEL.
* Introduce cl_assert_equal_oidEdward Thomson2014-07-011-1/+1
|
* Rename tests-clar to testsBen Straub2013-11-141-0/+119