<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_rev(tag=True):
 """Get build revision. @param tag Use git tag instead of hash? """

    rev_cmd = "git describe --always --tag" if tag in (True, "True") else \
              "git rev-parse HEAD"
    return local(rev_cmd, capture=True).strip()