@@ -62,12 +62,12 @@ def __init__(self, repo, **kwargs):
6262
6363 if self .id :
6464 if 'parents' in kwargs :
65- self .parents = map (lambda p : Commit (repo , ** { 'id' : p } ), kwargs ['parents' ])
65+ self .parents = map (lambda p : Commit (repo , id = p ), kwargs ['parents' ])
6666 if 'tree' in kwargs :
67- self .tree = tree .Tree (repo , ** { 'id' : kwargs ['tree' ]} )
67+ self .tree = tree .Tree (repo , id = kwargs ['tree' ])
6868
6969 def __bake__ (self ):
70- temp = Commit .find_all (self .repo , self .id , ** { ' max_count' : 1 } )[0 ]
70+ temp = Commit .find_all (self .repo , self .id , max_count = 1 )[0 ]
7171 self .parents = temp .parents
7272 self .tree = temp .tree
7373 self .author = temp .author
@@ -193,13 +193,13 @@ def diff(cls, repo, a, b = None, paths = None):
193193 if b :
194194 paths .insert (0 , b )
195195 paths .insert (0 , a )
196- text = repo .git .diff (* paths , ** { 'full_index' : True } )
196+ text = repo .git .diff (full_index = True , * paths )
197197 return diff .Diff .list_from_string (repo , text )
198198
199199 @property
200200 def diffs (self ):
201201 if not self .parents :
202- d = self .repo .git .show (self .id , ** { ' full_index' : True , ' pretty' : ' raw'} )
202+ d = self .repo .git .show (self .id , full_index = True , pretty = ' raw' )
203203 if re .search (r'diff --git a' , d ):
204204 if not re .search (r'^diff --git a' , d ):
205205 p = re .compile (r'.+?(diff --git a)' , re .MULTILINE | re .DOTALL )
@@ -213,14 +213,14 @@ def diffs(self):
213213 @property
214214 def stats (self ):
215215 if not self .parents :
216- text = self .repo .git .diff (self .id , ** { ' numstat' : True } )
216+ text = self .repo .git .diff (self .id , numstat = True )
217217 text2 = ""
218218 for line in text .splitlines ():
219219 (insertions , deletions , filename ) = line .split ("\t " )
220220 text2 += "%s\t %s\t %s\n " % (deletions , insertions , filename )
221221 text = text2
222222 else :
223- text = self .repo .git .diff (self .parents [0 ].id , self .id , ** { ' numstat' : True } )
223+ text = self .repo .git .diff (self .parents [0 ].id , self .id , numstat = True )
224224 return stats .Stats .list_from_string (self .repo , text )
225225
226226 def __str__ (self ):
0 commit comments