def __set_head(rev):
    if rev in __get_branches():
        __write_file(".tig/HEAD", "ref: refs/heads/{0}".format(rev))
    else:
        __write_file(".tig/HEAD", rev)
dataset/ETHPy150Open bravegnu/tiny-git/v4/tig.py/__set_head/original