diff options
author | Florian Apolloner <florian@apolloner.eu> | 2008-05-20 22:27:42 +0200 |
---|---|---|
committer | Florian Apolloner <florian@apolloner.eu> | 2008-05-20 22:27:42 +0200 |
commit | 9b975d9fcf5924800f9ea5d68d7d79f743ca9af7 (patch) | |
tree | 47c1bdb2909d7383146f08dc1c15c390eefe9e47 /lib/git_python/git.py | |
parent | 69a56c4e2addd1ec53bb40e8a18f52353d1fc28c (diff) | |
download | gitpython-9b975d9fcf5924800f9ea5d68d7d79f743ca9af7.tar.gz |
removed some more spaces
Diffstat (limited to 'lib/git_python/git.py')
-rw-r--r-- | lib/git_python/git.py | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/lib/git_python/git.py b/lib/git_python/git.py index ee256356..2251ecb2 100644 --- a/lib/git_python/git.py +++ b/lib/git_python/git.py @@ -11,25 +11,25 @@ class Git(MethodMissingMixin): def __init__(self, git_dir): super(Git, self).__init__() self.git_dir = git_dir - + git_binary = "/usr/bin/env git" - + @property def get_dir(self): return self.git_dir - + def execute(self, command): """ Handles executing the command on the shell and consumes and returns the returned information (stdout) - + ``command`` The command to execute """ print command - proc = subprocess.Popen(command, + proc = subprocess.Popen(command, shell=True, - stdout=subprocess.PIPE + stdout=subprocess.PIPE ) stdout_value = proc.communicate()[0] return stdout_value @@ -51,31 +51,31 @@ class Git(MethodMissingMixin): else: args.append("--%s=%r" % (dashify(k), v)) return args - + def method_missing(self, method, *args, **kwargs): """ Run the given git command with the specified arguments and return the result as a String - + ``method`` is the command - + ``args`` is the list of arguments - + ``kwargs`` is a dict of keyword arguments Examples git.rev_list('master', max_count=10, header=True) - + Returns str """ opt_args = self.transform_kwargs(**kwargs) ext_args = map(lambda a: (a == '--') and a or "%s" % shell_escape(a), args) args = opt_args + ext_args - + call = "%s --git-dir=%s %s %s" % (self.git_binary, self.git_dir, dashify(method), ' '.join(args)) stdout_value = self.execute(call) return stdout_value |