changeset 2183:9d27481228a1 beta

Extend GIT command wrapper with GIT_CONFIG_NOGLOBAL=1 to bypass gitconfig global
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 11 Apr 2012 23:10:46 +0200
parents f635e8bdfb60
children 79e4d6b9c1f0
files rhodecode/lib/vcs/backends/git/repository.py
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/lib/vcs/backends/git/repository.py	Wed Apr 11 19:11:15 2012 +0200
+++ b/rhodecode/lib/vcs/backends/git/repository.py	Wed Apr 11 23:10:46 2012 +0200
@@ -78,11 +78,12 @@
 
         :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),