File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -238,11 +238,10 @@ + (NSString *)parseDiffTree:(NSString *)txt withStats:(NSMutableDictionary *)sta
238
238
NSArray *lines = [txt componentsSeparatedByString: @" \n " ];
239
239
NSMutableString *res=[NSMutableString string ];
240
240
[res appendString: @" <table id='filelist'>" ];
241
- int i;
242
- for (i=1 ; i<[lines count ]; i++) {
243
- NSString *line=[lines objectAtIndex: i];
244
- NSArray *fields=[line componentsSeparatedByString: @" " ];
245
- NSArray *fileStatus=[[fields objectAtIndex: 4 ] componentsSeparatedByString: @" \t " ];
241
+ for (NSString *line in lines) {
242
+ if ([line length ]<98 ) continue ;
243
+ line=[line substringFromIndex: 97 ];
244
+ NSArray *fileStatus=[line componentsSeparatedByString: @" \t " ];
246
245
NSString *status=[[fileStatus objectAtIndex: 0 ] substringToIndex: 1 ]; // ignore the score
247
246
NSString *file=[fileStatus objectAtIndex: 1 ];
248
247
NSString *txt=file;
You can’t perform that action at this time.
0 commit comments