add set_head, head for repo