summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/git/blob.py18
-rw-r--r--lib/git/commit.py14
-rw-r--r--lib/git/diff.py4
-rw-r--r--lib/git/head.py2
-rw-r--r--lib/git/repo.py4
-rw-r--r--lib/git/tag.py2
-rw-r--r--lib/git/tree.py6
7 files changed, 25 insertions, 25 deletions
diff --git a/lib/git/blob.py b/lib/git/blob.py
index fd83fe1d..0b4b19c2 100644
--- a/lib/git/blob.py
+++ b/lib/git/blob.py
@@ -46,7 +46,7 @@ class Blob(object):
int
"""
if self._size is None:
- self._size = int(self.repo.git.cat_file(self.id, **{'s': True}).rstrip())
+ self._size = int(self.repo.git.cat_file(self.id, s=True).rstrip())
return self._size
@property
@@ -57,7 +57,7 @@ class Blob(object):
Returns
str
"""
- self.data_stored = self.data_stored or self.repo.git.cat_file(self.id, **{'p': True, 'with_raw_output': True})
+ self.data_stored = self.data_stored or self.repo.git.cat_file(self.id, p=True, with_raw_output=True)
return self.data_stored
@property
@@ -85,7 +85,7 @@ class Blob(object):
Returns
list: [GitPython.Commit, list: [<line>]]
"""
- data = repo.git.blame(commit, '--', file, **{'p': True})
+ data = repo.git.blame(commit, '--', file, p=True)
commits = {}
blames = []
info = None
@@ -120,12 +120,12 @@ class Blob(object):
if info:
c = commits.has_key(info['id']) and commits[info['id']]
if not c:
- c = Commit(repo, **{'id': info['id'],
- 'author': Actor.from_string(info['author'] + ' ' + info['author_email']),
- 'authored_date': info['author_date'],
- 'committer': Actor.from_string(info['committer'] + ' ' + info['committer_email']),
- 'committed_date': info['committer_date'],
- 'message': info['summary']})
+ c = Commit(repo, id=info['id'],
+ author=Actor.from_string(info['author'] + ' ' + info['author_email']),
+ authored_date=info['author_date'],
+ committer=Actor.from_string(info['committer'] + ' ' + info['committer_email']),
+ committed_date=info['committer_date'],
+ message=info['summary'])
commits[info['id']] = c
m = re.search(r'^\t(.*)$', line)
diff --git a/lib/git/commit.py b/lib/git/commit.py
index d30d1250..18e36c00 100644
--- a/lib/git/commit.py
+++ b/lib/git/commit.py
@@ -62,12 +62,12 @@ class Commit(LazyMixin):
if self.id:
if 'parents' in kwargs:
- self.parents = map(lambda p: Commit(repo, **{'id': p}), kwargs['parents'])
+ self.parents = map(lambda p: Commit(repo, id=p), kwargs['parents'])
if 'tree' in kwargs:
- self.tree = tree.Tree(repo, **{'id': kwargs['tree']})
+ self.tree = tree.Tree(repo, id=kwargs['tree'])
def __bake__(self):
- temp = Commit.find_all(self.repo, self.id, **{'max_count': 1})[0]
+ temp = Commit.find_all(self.repo, self.id, max_count=1)[0]
self.parents = temp.parents
self.tree = temp.tree
self.author = temp.author
@@ -193,13 +193,13 @@ class Commit(LazyMixin):
if b:
paths.insert(0, b)
paths.insert(0, a)
- text = repo.git.diff(*paths, **{'full_index': True})
+ text = repo.git.diff(full_index=True, *paths)
return diff.Diff.list_from_string(repo, text)
@property
def diffs(self):
if not self.parents:
- d = self.repo.git.show(self.id, **{'full_index': True, 'pretty': 'raw'})
+ d = self.repo.git.show(self.id, full_index=True, pretty='raw')
if re.search(r'diff --git a', d):
if not re.search(r'^diff --git a', d):
p = re.compile(r'.+?(diff --git a)', re.MULTILINE | re.DOTALL)
@@ -213,14 +213,14 @@ class Commit(LazyMixin):
@property
def stats(self):
if not self.parents:
- text = self.repo.git.diff(self.id, **{'numstat': True})
+ text = self.repo.git.diff(self.id, numstat=True)
text2 = ""
for line in text.splitlines():
(insertions, deletions, filename) = line.split("\t")
text2 += "%s\t%s\t%s\n" % (deletions, insertions, filename)
text = text2
else:
- text = self.repo.git.diff(self.parents[0].id, self.id, **{'numstat': True})
+ text = self.repo.git.diff(self.parents[0].id, self.id, numstat=True)
return stats.Stats.list_from_string(self.repo, text)
def __str__(self):
diff --git a/lib/git/diff.py b/lib/git/diff.py
index 9285465a..51315fe3 100644
--- a/lib/git/diff.py
+++ b/lib/git/diff.py
@@ -20,11 +20,11 @@ class Diff(object):
if not a_commit or re.search(r'^0{40}$', a_commit):
self.a_commit = None
else:
- self.a_commit = commit.Commit(repo, **{'id': a_commit})
+ self.a_commit = commit.Commit(repo, id=a_commit)
if not b_commit or re.search(r'^0{40}$', b_commit):
self.b_commit = None
else:
- self.b_commit = commit.Commit(repo, **{'id': b_commit})
+ self.b_commit = commit.Commit(repo, id=b_commit)
self.a_mode = a_mode
self.b_mode = b_mode
diff --git a/lib/git/head.py b/lib/git/head.py
index 9a5d2fd4..96d35010 100644
--- a/lib/git/head.py
+++ b/lib/git/head.py
@@ -105,7 +105,7 @@ class Head(object):
"""
full_name, ids = line.split("\x00")
name = full_name.split("/")[-1]
- c = commit.Commit(repo, **{'id': ids})
+ c = commit.Commit(repo, id=ids)
return Head(name, c)
def __repr__(self):
diff --git a/lib/git/repo.py b/lib/git/repo.py
index 8f5d4dca..0e52fab7 100644
--- a/lib/git/repo.py
+++ b/lib/git/repo.py
@@ -197,7 +197,7 @@ class Repo(object):
other_repo_refs = other_repo.git.rev_list(other_ref).strip().splitlines()
diff_refs = list(set(other_repo_refs) - set(repo_refs))
- return map(lambda ref: Commit.find_all(other_repo, ref, **{'max_count': 1}[0]), diff_refs)
+ return map(lambda ref: Commit.find_all(other_repo, ref, max_count=1)[0], diff_refs)
def tree(self, treeish = 'master', paths = []):
"""
@@ -228,7 +228,7 @@ class Repo(object):
Returns
``GitPython.Blob``
"""
- return Blob(self, **{'id': id})
+ return Blob(self, id=id)
def log(self, commit = 'master', path = None, **kwargs):
"""
diff --git a/lib/git/tag.py b/lib/git/tag.py
index 6b0e63e0..f54b7661 100644
--- a/lib/git/tag.py
+++ b/lib/git/tag.py
@@ -84,7 +84,7 @@ class Tag(object):
"""
full_name, ids = line.split("\x00")
name = full_name.split("/")[-1]
- commit = Commit(repo, **{'id': ids})
+ commit = Commit(repo, id=ids)
return Tag(name, commit)
def __repr__(self):
diff --git a/lib/git/tree.py b/lib/git/tree.py
index daa2a49e..f1aa0b3b 100644
--- a/lib/git/tree.py
+++ b/lib/git/tree.py
@@ -27,7 +27,7 @@ class Tree(LazyMixin):
@classmethod
def construct(cls, repo, treeish, paths = []):
output = repo.git.ls_tree(treeish, *paths)
- return Tree(repo, **{'id': treeish}).construct_initialize(repo, treeish, output)
+ return Tree(repo, id=treeish).construct_initialize(repo, treeish, output)
def construct_initialize(self, repo, id, text):
self.repo = repo
@@ -62,9 +62,9 @@ class Tree(LazyMixin):
return None
if typ == "tree":
- return Tree(repo, **{'id': id, 'mode': mode, 'name': name})
+ return Tree(repo, id=id, mode=mode, name=name)
elif typ == "blob":
- return blob.Blob(repo, **{'id': id, 'mode': mode, 'name': name})
+ return blob.Blob(repo, id=id, mode=mode, name=name)
elif typ == "commit":
return None
else: