`git branch` upstream-setting fixes

also helper script for checking installed `git` version
Lame. I wonder if there's a reason we need to be stuck on Python 2.6.
Python 2.7 has been out for more than four years:
https://en.wikipedia.org/wiki/History_of_Python#Version_release_dates

On Thu, Sep 11, 2014 at 4:59 PM, Ryan Williams <notifications@github.com>
wrote:

> In git-version-greater-than-or-equal-to:
>
> > @@ -0,0 +1,30 @@
> > +#!/usr/bin/env python
> > +
> > +import re
> > +import subprocess
> > +import sys
> > +
> > +if len(sys.argv) == 0:
> > +  print "Usage: %s <version>" % sys.argv[0]
> > +  sys.exit(255)
> > +
> > +input_segments = map(int, sys.argv[1].split('.'))
> > +
> > +version_regex = 'git version ((?:([0-9]+)\.)*[0-9]+)'
> > +version_output = subprocess.Popen(['git', '--version'], stdout=subprocess.PIPE).communicate()[0]
>
> ha! you would think!
>
> except when I tried to run on demeter, which has python 2.6, which
> doesn't have check_output
> <http://stackoverflow.com/questions/4814970/subprocess-check-output-doesnt-seem-to-exist-python-2-6-5>
> .
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/ryan-williams/git-helpers/pull/5/files#r17448439>.
>