@@ -62,12 +62,12 @@ def __init__(self, repo, **kwargs):
62
62
63
63
if self .id :
64
64
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' ])
66
66
if 'tree' in kwargs :
67
- self .tree = tree .Tree (repo , ** { 'id' : kwargs ['tree' ]} )
67
+ self .tree = tree .Tree (repo , id = kwargs ['tree' ])
68
68
69
69
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 ]
71
71
self .parents = temp .parents
72
72
self .tree = temp .tree
73
73
self .author = temp .author
@@ -193,13 +193,13 @@ def diff(cls, repo, a, b = None, paths = None):
193
193
if b :
194
194
paths .insert (0 , b )
195
195
paths .insert (0 , a )
196
- text = repo .git .diff (* paths , ** { 'full_index' : True } )
196
+ text = repo .git .diff (full_index = True , * paths )
197
197
return diff .Diff .list_from_string (repo , text )
198
198
199
199
@property
200
200
def diffs (self ):
201
201
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' )
203
203
if re .search (r'diff --git a' , d ):
204
204
if not re .search (r'^diff --git a' , d ):
205
205
p = re .compile (r'.+?(diff --git a)' , re .MULTILINE | re .DOTALL )
@@ -213,14 +213,14 @@ def diffs(self):
213
213
@property
214
214
def stats (self ):
215
215
if not self .parents :
216
- text = self .repo .git .diff (self .id , ** { ' numstat' : True } )
216
+ text = self .repo .git .diff (self .id , numstat = True )
217
217
text2 = ""
218
218
for line in text .splitlines ():
219
219
(insertions , deletions , filename ) = line .split ("\t " )
220
220
text2 += "%s\t %s\t %s\n " % (deletions , insertions , filename )
221
221
text = text2
222
222
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 )
224
224
return stats .Stats .list_from_string (self .repo , text )
225
225
226
226
def __str__ (self ):
0 commit comments