builtin/show-branch: rewrite functions to work with object_id