The main gitshed functionality.

Pulls together code from previous commits.

The main() wrapper, BUILD files etc. will follow shortly.
Yeah, but early returns have their own set of issues. Anyway, there are so many ways that python can mess you up if you get the indentation wrong, there's no comprehensive way to work around it. One has to just embrace that fact of Python, I think...