Module git: simplify get_version
Module git: simplify boolean expressions
Module git: remove useless test

The test was useless according to os.path.join documentation:
"If any component is an absolute path, all previous components
are thrown away, and joining continues."
Git module: use existing variable instead of recomputing it

If I'm not mistaken, `dest`already contains what we want.
It's simpler to use it directly instead of reverting the computation
done for `repo_path`.
Git module: variable `remote_head` is used only in check mode
Git module: remove dead code
Module git: simplify get_branches using list comprehension
Module git: remove unused function