Changeset - 9d27481228a1
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 14 years ago 2012-04-11 23:10:46
marcin@python-works.com
Extend GIT command wrapper with GIT_CONFIG_NOGLOBAL=1 to bypass gitconfig global
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -75,17 +75,18 @@ class GitRepository(BaseRepository):
 
           This method exists only until log/blame functionality is implemented
 
           at Dulwich (see https://bugs.launchpad.net/bugs/645142). Parsing
 
           os command's output is road to hell...
 

	
 
        :param cmd: git command to be executed
 
        """
 

	
 
        #cmd = '(cd %s && git %s)' % (self.path, cmd)
 
        if isinstance(cmd, basestring):
 
            cmd = 'git %s' % cmd
 
            cmd = 'GIT_CONFIG_NOGLOBAL=1 git %s' % cmd
 
        else:
 
            cmd = ['git'] + cmd
 
            cmd = ['GIT_CONFIG_NOGLOBAL=1', 'git'] + cmd
 
        try:
 
            opts = dict(
 
                shell=isinstance(cmd, basestring),
 
                stdout=PIPE,
 
                stderr=PIPE)
 
            if os.path.isdir(self.path):
0 comments (0 inline, 0 general)