tests-clar/refs/lookup.c


Log

Author Commit Date CI Message
Carlos Martín Nieto bb45c57f 2013-03-07T16:38:44 refs: explicitly catch leading slashes It's somewhat common to try to write "/refs/tags/something". There is no easy way to catch it during the main body of the function, as there is no way to distinguish whether it's a leading slash or a double slash somewhere in the middle. Catch this at the beginning so we don't trigger the assert in is_all_caps_and_underscore().
Ben Straub 2508cc66 2012-11-18T21:38:08 Rename ref and reflog apis for consistency
nulltoken 77e06d7e 2012-09-17T07:11:32 refs: introduce git_reference_is_valid_name()
Russell Belfer 26515e73 2012-04-23T10:06:31 Rename to git_reference_name_to_oid
Russell Belfer f201d613 2012-04-13T10:33:14 Add git_reference_lookup_oid and lookup_resolved Adds a new public reference function `git_reference_lookup_oid` that directly resolved a reference name to an OID without returning the intermediate `git_reference` object (hence, no free needed). Internally, this adds a `git_reference_lookup_resolved` function that combines looking up and resolving a reference. This allows us to be more efficient with memory reallocation. The existing `git_reference_lookup` and `git_reference_resolve` are reimplmented on top of the new utility and a few places in the code are changed to use one of the two new functions.