builtin/show-branch: rewrite functions to take object_id arguments