GitRepository: Skip empty lines when parsing refs

This fixes loading repositories.
This commit is contained in:
Christian Jacobsen
2008-09-29 20:35:19 +02:00
committed by Pieter de Bie
parent b753ab09e5
commit e25aec668b
+4
View File
@@ -213,6 +213,10 @@ static NSString* gitPath;
NSArray* lines = [output componentsSeparatedByString:@"\n"];
for (NSString* line in lines) {
// If its an empty line, skip it (e.g. with empty repositories)
if ([line length] == 0)
continue;
NSArray* components = [line componentsSeparatedByString:@" "];
// First do the ref matching. If this ref is new, add it to our ref list