Commit 64e6fff5 authored by Guido Günther's avatar Guido Günther

GitRepository: Use C locale when parsing remote branches

Otherwise the result can be locale dependent
parent 901581b8
...@@ -1084,7 +1084,9 @@ class GitRepository(object): ...@@ -1084,7 +1084,9 @@ class GitRepository(object):
@return: remote repositories @return: remote repositories
@rtype: C{dict} of C{GitRemote} @rtype: C{dict} of C{GitRemote}
""" """
out, err, ret = self._git_inout('remote', [], capture_stderr=True) out, err, ret = self._git_inout('remote', [],
extra_env={'LC_ALL': 'C'},
capture_stderr=True)
if ret: if ret:
raise GitRepositoryError('Failed to get list of remotes: %s' % err) raise GitRepositoryError('Failed to get list of remotes: %s' % err)
...@@ -1092,6 +1094,7 @@ class GitRepository(object): ...@@ -1092,6 +1094,7 @@ class GitRepository(object):
remotes = {} remotes = {}
for remote in out.splitlines(): for remote in out.splitlines():
out, err, _ret = self._git_inout('remote', ['show', '-n', remote], out, err, _ret = self._git_inout('remote', ['show', '-n', remote],
extra_env={'LC_ALL': 'C'},
capture_stderr=True) capture_stderr=True)
if ret: if ret:
raise GitRepositoryError('Failed to get information for remote ' raise GitRepositoryError('Failed to get information for remote '
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment