mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
Use a task (that is properly disposed of) for reading the rev list
This commit is contained in:
+4
-1
@@ -88,7 +88,9 @@
|
||||
if ([rev hasPathLimiter])
|
||||
[arguments insertObject:@"--children" atIndex:1];
|
||||
|
||||
NSFileHandle* handle = [repository handleForArguments: arguments];
|
||||
NSTask *task = [PBEasyPipe taskForCommand:[PBGitBinary path] withArgs:arguments inDir:nil];
|
||||
[task launch];
|
||||
NSFileHandle* handle = [task.standardOutput fileHandleForReading];
|
||||
|
||||
int fd = [handle fileDescriptor];
|
||||
FILE* f = fdopen(fd, "r");
|
||||
@@ -153,6 +155,7 @@
|
||||
|
||||
// Make sure the commits are stored before exiting.
|
||||
[self performSelectorOnMainThread:@selector(setCommits:) withObject:revisions waitUntilDone:YES];
|
||||
[task waitUntilExit];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user