diff --git a/nbgitpuller/pull.py b/nbgitpuller/pull.py index 2b74b4b4..dd085e64 100644 --- a/nbgitpuller/pull.py +++ b/nbgitpuller/pull.py @@ -16,6 +16,9 @@ def execute_cmd(cmd, **kwargs): yield '$ {}\n'.format(' '.join(cmd)) kwargs['stdout'] = subprocess.PIPE kwargs['stderr'] = subprocess.STDOUT + # Explicitly set LANG=C, as `git` commandline output will be different if + # the user environment has a different locale set! + kwargs['env'] = dict(os.environ, LANG='C') proc = subprocess.Popen(cmd, **kwargs) diff --git a/tests/repohelpers.py b/tests/repohelpers.py index 9a83dfb8..dabd9762 100644 --- a/tests/repohelpers.py +++ b/tests/repohelpers.py @@ -18,7 +18,7 @@ def __init__(self, path=None): def __enter__(self): os.makedirs(self.path, exist_ok=True) - self.git('init', '--bare') + self.git('init', '--bare', '--initial-branch=master') return self def __exit__(self, *args):