Skip to content

Commit e5dac3f

Browse files
author
jomae
committed
1.7.1dev: merge [17894] from 1.6-stable (fix for #13879)
git-svn-id: http://trac.edgewall.org/intertrac/log:/trunk@17895 af82e41b-90c4-0310-8c96-b1721e28e2e2
2 parents 3747ce1 + 209da88 commit e5dac3f

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tracopt/versioncontrol/git/tests/git_fs.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ class GitCommandMixin(object):
4141

4242
git_bin = locate('git')
4343

44+
_git_opts = (
45+
'-c', 'init.defaultBranch=master',
46+
'-c', 'protocol.file.allow=always',
47+
'-c', 'core.protectNTFS=false',
48+
)
49+
4450
def _git_commit(self, *args, **kwargs):
4551
env = kwargs.get('env') or os.environ.copy()
4652
if 'date' in kwargs:
@@ -50,16 +56,14 @@ def _git_commit(self, *args, **kwargs):
5056
return self._git(*args, **kwargs)
5157

5258
def _spawn_git(self, *args, **kwargs):
53-
args = (self.git_bin,) + args
59+
args = (self.git_bin,) + self._git_opts + args
5460
kwargs.setdefault('stdin', DEVNULL)
5561
kwargs.setdefault('stdout', PIPE)
5662
kwargs.setdefault('stderr', PIPE)
5763
kwargs.setdefault('cwd', self.repos_path)
5864
return Popen(args, close_fds=close_fds, **kwargs)
5965

6066
def _git(self, *args, **kwargs):
61-
args = ('-c', 'init.defaultBranch=master',
62-
'-c', 'protocol.file.allow=always') + args
6367
with self._spawn_git(*args, **kwargs) as proc:
6468
stdout, stderr = proc.communicate()
6569
self.assertEqual(0, proc.returncode,

0 commit comments

Comments
 (0)